单臂路由和静态路由
实验拓扑图
实验目的
实现pc1、pc2、pc3之间互相ping通对方
实验代码参考
LSW1:
#
sysname Huawei
#
vlan batch 100 200
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
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 MEth0/0/1
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface Ethernet0/0/2
port link-type access
port default vlan 100
#
interface Ethernet0/0/3
port link-type access
port default vlan 200
#
注意:配置e0/0/1的接口的时候
int e0/0/1.100
ip add 192.168.100.1 24
dotp1 termination vid 100
arp broadcast enable
int e0/0/1.200
ip add 192.168.200.1 24
dotp1 termination vid 200
arp broadcast enable
AR1:
[V200R003C00]
#
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
#
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 1.1.1.1 255.255.255.252
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.100
dot1q termination vid 100
ip address 192.168.100.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/1.200
dot1q termination vid 200
ip address 192.168.200.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2
ip address 2.2.2.1 255.255.255.252
#
interface NULL0
#
ip route-static 172.32.0.0 255.255.255.0 1.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.1 GigabitEthernet
0/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
2.2.2.0/30 Direct 0 0 D 2.2.2.1 GigabitEthernet
0/0/2
2.2.2.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
2.2.2.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.32.0.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
192.168.100.0/24 Direct 0 0 D 192.168.100.1 GigabitEthernet
0/0/1.100
192.168.100.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1.100
192.168.100.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1.100
192.168.200.0/24 Direct 0 0 D 192.168.200.1 GigabitEthernet
0/0/1.200
192.168.200.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1.200
192.168.200.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1.200
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
AR4:
[V200R003C00]
#
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
#
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 1.1.1.2 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 172.32.0.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 2.2.2.2 255.255.255.252
#
interface NULL0
#
ip route-static 192.168.100.0 255.255.255.0 1.1.1.1
ip route-static 192.168.200.0 255.255.255.0 1.1.1.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.2 GigabitEthernet
0/0/0
1.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
2.2.2.0/30 Direct 0 0 D 2.2.2.2 GigabitEthernet
0/0/2
2.2.2.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
2.2.2.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
172.32.0.0/24 Direct 0 0 D 172.32.0.1 GigabitEthernet
0/0/1
172.32.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
172.32.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.100.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
192.168.200.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0