在接口上配置IP地址:
vpp# set interface mtu 1500 GigabitEthernet13/0/0
vpp# set interface mtu 1500 GigabitEthernetb/0/0
vpp# set interface ip address GigabitEthernetb/0/0 1.1.1.254/24
vpp# set interface ip address GigabitEthernet13/0/0 2.1.1.254/24
vpp# set int state GigabitEthernetb/0/0 up
vpp# set int state GigabitEthernet13/0/0 up
vpp# show ip fib
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:adjacency:2, src:default-route:1, ]
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]]
[0] [@0]: dpo-drop ip4
1.1.1.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:10 buckets:1 uRPF:9 to:[0:0]]
[0] [@0]: dpo-drop ip4
1.1.1.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:18 to:[30:2748] via:[2:168]]
[0] [@5]: ipv4 via 1.1.1.1 GigabitEthernetb/0/0: mtu:1500 000c296b7d68000c298395bb0800
1.1.1.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:9 buckets:1 uRPF:8 to:[1:96]]
[0] [@4]: ipv4-glean: GigabitEthernetb/0/0: mtu:1500 ffffffffffff000c298395bb0806
1.1.1.254/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:12 buckets:1 uRPF:13 to:[7:648]]
[0] [@2]: dpo-receive: 1.1.1.254 on GigabitEthernetb/0/0
1.1.1.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:11 to:[0:0]]
[0] [@0]: dpo-drop ip4
2.1.1.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:15 to:[0:0]]
[0] [@0]: dpo-drop ip4
2.1.1.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:20 to:[33:2940] via:[2:168]]
[0] [@5]: ipv4 via 2.1.1.1 GigabitEthernet13/0/0: mtu:1500 000c29fc422f000c298395c50800
2.1.1.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:14 to:[1:96]]
[0] [@4]: ipv4-glean: GigabitEthernet13/0/0: mtu:1500 ffffffffffff000c298395c50806
2.1.1.254/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:19 to:[16:1512]]
[0] [@2]: dpo-receive: 2.1.1.254 on GigabitEthernet13/0/0
2.1.1.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:17 to:[0:0]]
[0] [@0]: dpo-drop ip4
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[0:0]]
[0] [@0]: dpo-drop ip4
vpp# ping 1.1.1.1
vpp# ping 2.1.1.1
在client上设置静态路由,ping对方,可以ping通。