OSPF(OpenShortestPathFirst)开放式最短路径优先协议无类别链路状态型路由协议,公有协议;跨层封装到IP报头,协议号89;组播更新:224.0.0.5,224.0.0.6。

AR1

SY AR1
bfd
#
interface GigabitEthernet0/0/0
 ip address 11.1.11.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 11.1.12.1 255.255.255.0 
#
bfd
bfd vlanif5 bind peer-ip 11.1.11.254 interface GigabitEthernet0/0/0
 discriminator local 2
 discriminator remote 1
 min-tx-interval 100
 min-rx-interval 100
 commit
#
bfd vlanif6 bind peer-ip 11.1.12.254 interface GigabitEthernet0/0/1
 discriminator local 6
 discriminator remote 5
 min-tx-interval 100
 min-rx-interval 100
 commit
#
ospf 1 
 area 0.0.0.0 
  network 11.1.11.1 0.0.0.0 
  network 11.1.12.1 0.0.0.0 

SY AR2
dhcp enable
#
bfd
#
ip pool vlan2
 gateway-list 192.168.2.1 
 network 192.168.2.0 mask 255.255.255.0 
 excluded-ip-address 192.168.2.253 192.168.2.254 
 dns-list 10.1.12.1 
#
ip pool vlan3
 gateway-list 192.168.3.1 
 network 192.168.3.0 mask 255.255.255.0 
 excluded-ip-address 192.168.3.253 192.168.3.254 
 dns-list 10.1.22.1 
#
interface GigabitEthernet0/0/0
 ip address 10.1.22.1 255.255.255.0 
 dhcp select global
#
interface GigabitEthernet0/0/1
 ip address 10.1.12.1 255.255.255.0 
 dhcp select global
q
BFD
bfd vlanif7 bind peer-ip 10.1.12.254 interface GigabitEthernet0/0/0
 discriminator local 4
 discriminator remote 3
 min-tx-interval 100
 min-rx-interval 100
 commit
#
bfd vlanif8 bind peer-ip 10.1.22.254 interface GigabitEthernet0/0/1
 discriminator local 8
 discriminator remote 7
 min-tx-interval 100
 min-rx-interval 100
 commit
#
rip 1
 undo summary
 version 2
 network 10.0.0.0

sysname S1
#
vlan batch 2 to 8

stp instance 2 root primary
stp instance 3 root secondary

dhcp enable

stp region-configuration
 region-name EXAM
 revision-level 1
 instance 2 vlan 2
 instance 3 vlan 3
 active region-configuration
#
bfd

dhcp server group dhcp
 dhcp-server 10.1.12.1 0

interface Vlanif2
 ip address 192.168.2.254 255.255.255.0
 vrrp vrid 2 virtual-ip 192.168.2.1
 vrrp vrid 2 priority 120
 vrrp vrid 2 preempt-mode timer delay 55
 dhcp select relay
 dhcp relay server-select dhcp
#
interface Vlanif3
 ip address 192.168.3.254 255.255.255.0
 vrrp vrid 3 virtual-ip 192.168.3.1
#
interface Vlanif5
 ip address 11.1.11.254 255.255.255.0
#
interface Vlanif7
 ip address 10.1.12.254 255.255.255.0

interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 7
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk pvid vlan 3
 port trunk allow-pass vlan 3 5
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk pvid vlan 2
 port trunk allow-pass vlan 2 5
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 5

bfd vlanif5 bind peer-ip 11.1.11.1 interface Vlanif5
 discriminator local 1
 discriminator remote 2
 min-tx-interval 100
 min-rx-interval 100
 commit
#
bfd vlanif7 bind peer-ip 10.1.12.1 interface Vlanif7
 discriminator local 3
 discriminator remote 4
 min-tx-interval 100
 min-rx-interval 100
 commit
#
ospf 1
 import-route rip 1
 area 0.0.0.0
  network 11.1.11.254 0.0.0.0
#
rip 1
 undo summary
 version 2
 network 10.0.0.0
 network 192.168.2.0
 import-route ospf 1

sysname S2
#
vlan batch 2 to 8
#
stp instance 2 root secondary
stp instance 3 root primary

dhcp enable

stp region-configuration
 region-name EXAM
 revision-level 1
 instance 2 vlan 2
 instance 3 vlan 3
 active region-configuration
#
bfd

dhcp server group dhcp
 dhcp-server 10.1.22.1 0

interface Vlanif2
 ip address 192.168.2.253 255.255.255.0
 vrrp vrid 2 virtual-ip 192.168.2.1
#
interface Vlanif3
 ip address 192.168.3.253 255.255.255.0
 vrrp vrid 3 virtual-ip 192.168.3.1
 vrrp vrid 3 priority 120
 vrrp vrid 3 preempt-mode timer delay 55
 dhcp select relay
 dhcp relay server-select dhcp
#
interface Vlanif6
 ip address 11.1.12.254 255.255.255.0
#
interface Vlanif8
 ip address 10.1.22.254 255.255.255.0

interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 6
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk pvid vlan 2
 port trunk allow-pass vlan 2 5
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk pvid vlan 3
 port trunk allow-pass vlan 3 5
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 8

bfd vlanif6 bind peer-ip 11.1.12.1 interface Vlanif6
 discriminator local 5
 discriminator remote 6
 min-tx-interval 100
 min-rx-interval 100
 commit
#
bfd vlanif8 bind peer-ip 10.1.22.1 interface Vlanif8
 discriminator local 7
 discriminator remote 8
 min-tx-interval 100
 min-rx-interval 100
 commit
#
ospf 1
 import-route rip 1
 area 0.0.0.0
  network 11.1.12.254 0.0.0.0
#
rip 1
 undo summary
 version 2
 network 10.0.0.0
 network 192.168.3.0
 import-route ospf 1

sysname S3
#
vlan batch 2 to 8

stp region-configuration
 region-name EXAM
 revision-level 1
 instance 2 vlan 2
 instance 3 vlan 3
 active region-configuration

interface Ethernet0/0/1
 port link-type access
 port default vlan 2
#
interface Ethernet0/0/2
 port link-type trunk
 port trunk pvid vlan 2
 port trunk allow-pass vlan 2 5
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk pvid vlan 2
 port trunk allow-pass vlan 2 5
#

sysname S4
#
vlan batch 2 to 8
stp region-configuration
 region-name EXAM
 revision-level 1
 instance 2 vlan 2
 instance 3 vlan 3
 active region-configuration

interface Ethernet0/0/1
 port link-type access
 port default vlan 3
#
interface Ethernet0/0/2
 port link-type trunk
 port trunk pvid vlan 3
 port trunk allow-pass vlan 3 5
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk pvid vlan 3
 port trunk allow-pass vlan 3 5
#

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值