写新文章
 
 
                                    三层交换 脚本
----------------------------------------------------------------------------------------------
2691-R1的配置:
en
conf t
no ip do lo
hostname 2691-R1
line 0
exec-time 0 0
logg sync
exit
int e0/1
ip add 192.168.1.1 255.255.255.0
no sh
int e0/0
ip add 172.16.1.1 255.255.255.0
no sh
ip route 0.0.0.0 0.0.0.0 172.16.1.254 ---------------------缺省路由下一跳到ISP网关
ip route 192.168.10.0 255.255.255.0 192.168.1.2
ip route 192.168.100.0 255.255.255.0 192.168.1.2
-----------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
3560-SW1的配置:
en
conf t
no ip do lo
hostname 3560-SW1
line 0
exec-time 0 0
logg sync
end
vlan database
vlan 10 name cwb
vlan 100 name srv
exit
conf t
int f0/11
swithcport mode vlan 10---------------------将F0/0端口划分到vlan10
int f0/10
switchport mode vlan 100
exit
int f0/1
no switchport          ----------------------将三层交换的路由功能打开
ip add 192.168.1.2 255.255.255.0
int
int vlan 1   --------------------------------配置SVI接口IP地址
ip add 192.168.0.254 255.255.255.0
int vlan 10
ip add 192.168.10.254 255.255.255.0
int vlan 100
ip add 192.168.100.254 255.255.255.0
exit
ip route 0.0.0.0 0.0.0.0 192.168.1.1
int vlan 10
ip helper-address 192.168.100.1   -------------DHCP中继代理
--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
仅供参考 如有错误请自己解决 如错误严重 请联系我 。。。。。。。。。。。。
                               董礼制作 侵权必究