1. 实验示意图
2. 要求
- SW1,R1,R2,SW2之间运行静态路由,PC1和PC2之间互通。
3. 当前配置
3.1 PC1、PC2配置
- 配置PC1和PC2的ip地址、子网掩码和网关(在模拟器中,右键PC图标,选择“启动”,然后右键PC图标,选择“配置”)
3.2 SW1配置(Cisco)
sys
hostname SW1
interface Vlan2
ip address 10.208.4.1 255.255.255.192
interface Vlan100
ip address 10.208.1.2 255.255.255.252
interface GigabitEthernet1/0/4
switchport mode access
switchport access vlan 100
interface GigabitEthernet1/0/8
switchport mode access
switchport access vlan 2
ip route 10.213.1.0 255.255.255.0 10.208.1.1
line vty 0 4
password cisco
login
3.3 R1配置(Cisco)
enable
hostname R1
card type e1 0 0
controller E1 0/0/1
channel-group 0 unframed
interface Serial0/0/1:0
ip address 10.208.1.5 255.255.255.252
encapsulation ppp
interface GigabitEthernet0/0
ip address 10.208.1.1 255.255.255.252
ip route 10.208.4.0 255.255.255.0 10.208.1.2
ip route 10.208.1.0 255.255.255.0 10.208.1.6
ip route 10.213.1.0 255.255.255.0 10.208.1.6
3.4 R2配置(Huawei)
sys
sysname R2
interface Serial4/0/0
link-protocol ppp
ip address 10.208.1.6 255.255.255.252
fe1 unframed
interface GigabitEthernet0/0/1
ip address 10.208.1.9 255.255.255.252
ip route-static 10.208.1.0 255.255.255.0 10.208.1.5
ip route-static 10.208.4.0 255.255.255.0 10.208.1.5
ip route-static 10.213.1.0 255.255.255.0 10.208.1.10
3.5 SW2配置(Cisco)
enable
hostname SW2
interface Vlan-interface2
ip address 10.213.1.1 255.255.255.192
interface Vlan-interface100
ip address 10.208.1.10 255.255.255.252
interface Ethernet0/4
switchport access vlan 100
interface Ethernet0/8
switchport access vlan 2
ip route 10.208.4.0 255.255.255.0 10.208.1.9