木叶之黄金飞刀:交换机网关的配置命令

来源:百度文库 编辑:高考问答 时间:2024/04/26 17:34:07
config # ip address 子网掩码
ip default-gateway
总是错误
急啊!!!!!!!
我配的交换机,不是路由器

我用的是cisco 2600的路由器,设置如下:

interface fastethernet0/0
no ip address
speed 100
full-duplex
!
interface fastethernet0/0.1
encapsulation dot1Q 1 native
ip address 172.18.1.250 255.255.255.0 ////路由IP,下面的交换机IP也是这个网段
!
interface fastethernet0/0.2
description public
encapsulation dot1Q 2
ip address 10.132.178.254 255.255.255.0 ////外来人员使用IP
!
interface fastethernet0/0.3
description office
encapsulation dot1Q 3
ip address 10.132.176.254 255.255.255.0 /////办公室使用IP
!
interface fastethernet0/0.4
description info
encapsulation dot1Q 4
ip address 10.132.177.254 255.255.255.0 ////系统部使用IP
!
interface fastethernet0/1
ip adderss 192.168.1.2 255.255.255.0
speed 100
full-duplex
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1 ///防火墙内网口IP
ip http server
!
!
!
dial-peer cor custom
!
!
line con 0
line aux 0
line vty 0 4
password xxxxxx
login
line vty 5 15
password cisco
login
!
end

有4个2950的交换机分别放在两个地方,分两个网段,,然后都连在一个2950交换机上,然后这个2950连在路由器上...,,,
现在我们有光纤要接进来,,想把光纤接在防火墙上,,然后从防火墙接到路由器上,,让下面的每个人都能访问Internet..那我要在路由器和防火墙上做什么设置....我以前没怎么接触过,请您讲的详细点,谢谢!!我说的不清楚的地方请您提出,谢谢!!

交换机网关设置方法一:

要利用Telnet方式登录连接到交换机,交换机就必须有一个IP地址,二层交换机的端口是无法设置IP地址,但由于交换机都默认有一个VLAN1接口,VLAN接口是可以设置IP地址的,因此,对于二层交换机,其管理地址,就是VLAN1接口的地址。

交换机网关设置方法二:

在工作站pc-01可以使用telnet方式远程管理不同网段的交换机,一般来说对于同网段的交换机管理时对交换机配置一个管理性IP地址就可以了,当要从一个交换机跨网段管理另一个交换机时需要给交换机网关设置。

交换机网关的配置命令是:gateway-list(华为),defaulte getaway(思科)。配置方法,以华为交换机为例:
1、将电脑用TELNET或CONSOLE线连接核心交换机。
2、输入核心交换机的用户名、密码并登陆。
3、进入交换机后:
system-view
ip pool vlan1
network 172.16.1.0 24
gateway-list 172.16.1.254

你在全局模式下敲一个ip routing