单臂
--------------------------------------
具体配置如下:
1。先配置好workstation1的IP和网关,:10.10.11.3 255.255.255.0 网关:10.10.11.1
Workstation2的IP和网关,ip:10.10.10.3 255.255.255.0 网关:10.10.10.1
2。在二层交换机上,
创建VLAN
switch#vlan dat
switch(vlan)#vlan 2
switch(vlan)#exit
创建完成,由于VLAN1默认不用创建,可用show vlan查看。
配置f0/1,f0/2,f0/3
Switch#conf t
Enter configuration commands ,one per line . End with CNTL/Z.
Switch(config)#inter vlan 1
Switch(config-if)#ip address 10.10.10.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#inter vlan 2
Switch(config-if)#ip address 10.10.11.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#inter f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#inter f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
3。在上的配置,
Router#config t
Enter configuration commands ,one per line . End with CNTL/Z.
Router(config)#inter f0/0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#inter f0/0.1
Router(config-subif)#encapsulation dot1q 1
Router(config-subif)#ip address 10.10.10.1 255.255.255.0
Router(config-subif)#exit
Router(config)#inter f0/0.2
Router(config-subif)#encapsulation dot1q 2
Router(config-subif)#ip address 10.10.11.1 255.255.255.0
Router(config-subif)#exit
4。在workstation1上,ping Workstaion2的IP。ping 10.10.10.3
在Workstation2上,ping Workstation1的IP。ping 10.10.11.3
实现了VLAN之间的互通。但是由于单臂路由的瓶颈,于是引进了三层交换机的概念。
===============================
交换机配置
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
!
!
!
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
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
阅读(1312) | 评论(0) | 转发(0) |