网络工程师交换试验手册之二十一:单臂路由的配置实例
2007-06-25 12:48
786 查看
实验目的:
实现2层交换机之间VLAN间的通信,把二层的vlan封装与路由器的子接口进行对应。
2600 IOS需求:IP Plus (c2600-ik8s-mz-122.15.T.bin)
实验拓扑:
实验内容:
交换机配置
3512xl#show running-config
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 3512xl
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/1:
!-- interface FastEthernet0/1
!-- switchport trunk encapsulation dot1q
!-- switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
ip address 10.10.10.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 10.10.10.1
!
line con 0
transport input none
stopbits 1
line vty 0 4
password mysecret
login
line vty 5 15
login
!
end
路由器配置
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname c2600
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1配置子接口,每一个子接口对应交换机的一个VLAN的封装。这样子接口的IP地址就是你交换机下面所连接PC的网关。
encapsulation isl 1
ip address 10.10.10.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.1:
!-- interface FastEthernet0/0.1
!-- encapsulation dot1Q 1 native
!-- ip address 10.10.10.1 255.255.255.0
!
!
interface FastEthernet0/0.2
encapsulation isl 2
ip address 10.10.11.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.2:
!-- interface FastEthernet0/0.2
!-- encapsulation dot1Q 2
!-- ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password mysecret
login
!
no scheduler allocate
end
实验总结:
这个实验虽然在工程项目中是不会出现的,但是在我们日常的实验中,单臂路由是经常使用的,这些使用的命令也是大家对VLAN和子接口的一个升华。
实现2层交换机之间VLAN间的通信,把二层的vlan封装与路由器的子接口进行对应。
2600 IOS需求:IP Plus (c2600-ik8s-mz-122.15.T.bin)
实验拓扑:
实验内容:
交换机配置
3512xl#show running-config
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 3512xl
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/1:
!-- interface FastEthernet0/1
!-- switchport trunk encapsulation dot1q
!-- switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
ip address 10.10.10.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 10.10.10.1
!
line con 0
transport input none
stopbits 1
line vty 0 4
password mysecret
login
line vty 5 15
login
!
end
路由器配置
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname c2600
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1配置子接口,每一个子接口对应交换机的一个VLAN的封装。这样子接口的IP地址就是你交换机下面所连接PC的网关。
encapsulation isl 1
ip address 10.10.10.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.1:
!-- interface FastEthernet0/0.1
!-- encapsulation dot1Q 1 native
!-- ip address 10.10.10.1 255.255.255.0
!
!
interface FastEthernet0/0.2
encapsulation isl 2
ip address 10.10.11.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.2:
!-- interface FastEthernet0/0.2
!-- encapsulation dot1Q 2
!-- ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password mysecret
login
!
no scheduler allocate
end
实验总结:
这个实验虽然在工程项目中是不会出现的,但是在我们日常的实验中,单臂路由是经常使用的,这些使用的命令也是大家对VLAN和子接口的一个升华。
相关文章推荐
- 网络工程师交换试验手册之二十:配置VTP中继协议
- 网络工程师交换试验手册之十八:SWITCH的基本配置
- 网络工程师交换试验手册之一:路由器的基本配置
- 网络工程师交换试验手册之二十三:Cisco 2900xl/3500xl/2950/3550密码恢复
- 网络工程师交换试验手册之十四:NBMA网络上OPSF实验
- 网络工程师交换试验手册之二:静态路由实验
- 网络工程师交换试验手册之二十五:详细讲授利用xmodem来恢复IOS
- 网络工程师交换试验手册之十二:帧中继网络模型
- 网络工程师交换试验手册之四:静态路由的负载均衡网络工程师交换试验手册之四:静态路由的负载均衡
- 网络工程师交换试验手册之十一:访问控制列表实验
- 网络工程师交换试验手册之十九:VLAN实验
- 网络工程师交换试验手册之九:RIP单播和被动接口实验
- 网络工程师交换试验手册之七:RIPv2汇总实验
- 网络工程师交换试验手册之二十五:详细讲授利用xmodem来恢复IOS
- 网络工程师交换试验手册之八:RIPv1与RIPv2的兼容性实验
- Cisco Packet Tracer 配置网络实例---包括单臂路由-3层交换机-NAT的配置
- 网络工程师交换试验手册之十七:NAT转换实验
- 网络工程师交换试验手册之七:RIPv2汇总实验
- 网络工程师交换试验手册之四:静态路由的负载均衡