然后重启VPP。
再次进入VPP就有ping命令了,还多了一些其他命令。
正好到这了,捎带看一下安装的扩展包情况。
但是重启之后新增加的接口不见了,重新配一下吧。
神奇不,不能ping通自己,却能ping通veth对端接口地址,查看邻居信息。
[root@localhost ~]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:0c:29:13:d9:6c brd ff:ff:ff:ff:ff:ff inet 192.168.1.131/24 brd 192.168.1.255 scope global noprefixroute ens192 valid_lft forever preferred_lft forever inet6 2408:8207:1918:7790:b931:4b6f:5bda:8e59/64 scope global noprefixroute dynamic valid_lft 259187sec preferred_lft 172787sec inet6 fe80::f797:19ba:c532:71a4/64 scope link noprefixroute valid_lft forever preferred_lft forever 3: ethhost@ethvpp: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 02:91:21:16:e5:e9 brd ff:ff:ff:ff:ff:ff inet 10.1.1.1/24 scope global ethhost valid_lft forever preferred_lft forever inet6 fe80::91:21ff:fe16:e5e9/64 scope link valid_lft forever preferred_lft forever 4: ethvpp@ethhost: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 3e:35:0f:15:74:a3 brd ff:ff:ff:ff:ff:ff inet6 fe80::3c35:fff:fe15:74a3/64 scope link valid_lft forever preferred_lft forever [root@localhost ~]# ping 10.1.1.1 PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data. 64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.085 ms 64 bytes from 10.1.1.1: icmp_seq=2 ttl=64 time=0.044 ms 64 bytes from 10.1.1.1: icmp_seq=3 ttl=64 time=0.047 ms --- 10.1.1.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.044/0.058/0.085/0.020 ms [root@localhost ~]# ping 10.1.1.2 PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data. 64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.197 ms 64 bytes from 10.1.1.2: icmp_seq=2 ttl=64 time=0.142 ms 64 bytes from 10.1.1.2: icmp_seq=3 ttl=64 time=0.136 ms --- 10.1.1.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.136/0.158/0.197/0.029 ms
而在内核就简单了,两个地址都能通。
再尝试ping一下内核的业务地址,则提示需要指定出接口,但即使带源接口仍不行。
其实就是没有路由而已。
增加一条路由。
ip route add 192.168.1.0/24 via 10.1.1.1
这不就通了吗。