VPP - 三层转发

在接口上配置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通。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值