1、网络拓扑
2、网络配置
AR1:
<ar>display current-configuration
[V200R003C00]
#
sysname ar
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
acl number 3000
rule 5 permit ip
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 100.1.1.2 255.255.255.0
nat outbound 3000
#
interface GigabitEthernet0/0/1
ip address 40.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 50.1.1.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 100 router-id 1.1.1.1
default-route-advertise always type 1 //引入缺省路由,无论有没有都添加
area 0.0.0.0
network 40.1.1.0 0.0.0.255
network 50.1.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<ar>
SW1:
[r1]display current-configuration
#
sysname r1
#
vlan batch 10 20 30 40 50
#
stp instance 1 root primary
stp instance 2 root secondary
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name gd
instance 1 vlan 10 30
instance 2 vlan 20
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.254
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 30
vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
#
interface Vlanif20
ip address 20.1.1.2 255.255.255.0
vrrp vrid 2 virtual-ip 20.1.1.254
#
interface Vlanif40
ip address 40.1.1.1 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ospf 100 router-id 2.2.2.2
import-route direct
area 0.0.0.0
network 40.1.1.0 0.0.0.255
#
user-interface con 0
idle-timeout 0 0
user-interface vty 0 4
#
return
[r1]
SW2:
[r2]display current-configuration
#
sysname r2
#
vlan batch 10 20 30 40 50
#
stp instance 1 root secondary
stp instance 2 root primary
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
stp region-configuration
region-name gd
instance 1 vlan 10 30
instance 2 vlan 20
active region-configuration
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.254
#
interface Vlanif20
ip address 20.1.1.1 255.255.255.0
vrrp vrid 2 virtual-ip 20.1.1.254
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 30
vrrp vrid 2 track interface GigabitEthernet0/0/1 reduced 30
#
interface Vlanif50
ip address 50.1.1.1 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 50
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ospf 100 router-id 3.3.3.3
import-route direct
area 0.0.0.0
network 50.1.1.0 0.0.0.255
#
user-interface con 0
idle-timeout 0 0
user-interface vty 0 4
#
return
[r2]
标签:ip,default,基础,GigabitEthernet0,网络,VRRP,trunk,interface,port From: https://blog.51cto.com/u_13560030/12182748