#If tap interfaces in vBRG are down, run the following commands
Code Block |
---|
title | Bring up tap interfaces in BRG |
---|
collapse | true |
---|
|
root>vppctl tap delete tap-0
root>vppctl tap delete tap-1
root>/opt/bind_nic.sh
root>/opt/set_nat.sh
root>vppctl show int |
#Show dhcp client
Code Block |
---|
title | Show DHCP client |
---|
collapse | true |
---|
|
root@zdcpe1cpe01brgemu01-201901181358:/opt# vppctl show dhcp client
[0] GigabitEthernet0/4/0 state DHCP_BOUND addr 10.3.0.2/24 gw 10.3.0.1
|
#Show snat detail
Code Block |
---|
title | Show snat detail |
---|
collapse | true |
---|
|
root@zdcpe1cpe01brgemu01-201901181358:/opt# vppctl show snat detail
SNAT mode: dynamic translations enabled
tap-1 in
GigabitEthernet0/4/0 out
tap-0 in
SNAT pool addresses interfaces:
GigabitEthernet0/4/0
10.3.0.2
tenant VRF independent
0 busy udp ports
1 busy tcp ports
0 busy icmp ports
1 users, 1 outside addresses, 1 active sessions, 1 static mappings
Hash table in2out
1 active elements
1 free lists
0 linear search buckets
Hash table out2in
1 active elements
1 free lists
0 linear search buckets
Hash table worker-by-in
1 active elements
1 free lists
0 linear search buckets
Hash table worker-by-out
0 active elements
0 free lists
0 linear search buckets
Thread 0 (vpp_main at lcore 0):
2 list pool elements
192.168.4.20: 0 dynamic translations, 1 static translations
static mappings:
tcp local 192.168.4.20:8183 external 10.3.0.2:8183 vrf 0 |
# Show vxlan tunnel
Code Block |
---|
root@zdcpe1cpe01gw01-201812032302:/opt# vppctl show vxlan tunnel
[0] src 10.5.0.104 dst 10.5.0.21 vni 104 sw_if_index 4 encap_fib_index 0 fib_entry_index 9 decap_next l2 |
...
Code Block |
---|
title | Show interface mac address |
---|
collapse | true |
---|
|
root@zdcpe1cpe01brgemu01-201812282326:~# vppctl show hardware-interfaces
Name Idx Link Hardware
GigabitEthernet0/4/0 1 up GigabitEthernet0/4/0
Ethernet address fa:16:3e:85:fa:ab
Red Hat Virtio
carrier up full duplex speed 10000 mtu 9216
rx queues 1, rx desc 256, tx queues 1, tx desc 256
tx frames ok 65
tx bytes ok 21778
rx frames ok 327
rx bytes ok 41230
extended stats:
rx good packets 327
tx good packets 65
rx good bytes 41230
tx good bytes 21778
rx q0packets 327
rx q0bytes 41230
tx q0packets 65
tx q0bytes 21778
rx q0 good packets 327
rx q0 good bytes 41230
rx q0 multicast packets 262
rx q0 broadcast packets 2
rx q0 undersize packets 1
rx q0 size 65 127 packets 269
rx q0 size 128 255 packets 1
rx q0 size 256 511 packets 56
tx q0 good packets 65
tx q0 good bytes 21778
tx q0 undersize packets 1
tx q0 size 65 127 packets 5
tx q0 size 256 511 packets 58
tx q0 size 1024 1518 packets 1
local0 0 down local0
local
tap-0 2 up tap-0
Ethernet address 02:fe:bd:f2:7b:71
tap-1 3 up tap-1
Ethernet address 02:fe:36:99:a5:5c
|
#show nat.service
Code Block |
---|
|
root@zdcpe1cpe01brgemu01-201901181358:/opt# systemctl status nat.service
● nat.service - Runs vbrg scripts for nat configuration
Loaded: loaded (/etc/systemd/system/nat.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2019-01-18 17:01:54 UTC; 5h 58min ago
Process: 2509 ExecStart=/opt/nat_service.sh (code=exited, status=0/SUCCESS)
Main PID: 2509 (code=exited, status=0/SUCCESS)
Jan 18 17:01:54 zdcpe1cpe01brgemu01-201901181358 systemd[1]: Started Runs vbrg scripts for nat configuration.
Jan 18 17:02:25 zdcpe1cpe01brgemu01-201901181358 nat_service.sh[2509]: hc tap ip address is 192.168.4.20
|
#service managed by systemd
...