华为S5700交换机,怎么给接口配置IP
3个回答
展开全部
先建立vlan:比如,我这里有vlan1000是做管理用的,vlan1740-1746是给用户用的
vlan batch 1000 1740 to 1746
之后进入interface+ 虚拟接口号里面就可以配置接口ip了:
interface Vlanif1#interface Vlanif1000 ip address 10.0.17.40 255.255.224.0#interface Vlanif1740 ip address 172.17.40.1 255.255.255.0
#interface Vlanif1741 ip address 172.17.41.1 255.255.255.0 dhcp select global#interface Vlanif1742 ip address 172.17.42.1 255.255.255.0 dhcp select global#interface Vlanif1743 ip address 172.17.43.1 255.255.255.0 dhcp select global#interface Vlanif1744 ip address 172.17.44.1 255.255.255.0 dhcp select global#interface Vlanif1745 ip address 172.17.45.1 255.255.255.0 dhcp select global#interface Vlanif1746 ip address 172.17.46.1 255.255.255.0 dhcp select global
如果喜欢可以建立几个dhcp服务地址池
ip pool vlan1746 gateway-list 172.17.46.1 network 172.17.46.0 mask 255.255.255.0 excluded-ip-address 172.17.46.192 172.17.46.254 dns-list 61.235.164.18 211.98.2.4 211.138.245.180 202.103.224.68 211.142.210.100 8.8.8.8
接着把物理接口设置为trunk 或 access口,比如:
interface GigabitEthernet0/0/1 port link-type access port default vlan 1745 ntdp enable ndp enable
#interface GigabitEthernet0/0/2 port link-type trunk port trunk pvid vlan 1746 port trunk allow-pass vlan 2 to 4094#interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 to 4094
再加一条默认路由,否则跨网段后访问不到你的vlan1000的管理ip的
ip route-static 0.0.0.0 0.0.0.0 10.0.1.1
最后,在aaa里面添加个用户名和密码,用户远程管理
aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user zjj password simple laozhou local-user zjj privilege level 15 local-user zjj service-type telnet
最后在vty 里面开启使用aaa里面的用户远程登录
user-interface vty 0 4 authentication-mode aaa user privilege level 15
vlan batch 1000 1740 to 1746
之后进入interface+ 虚拟接口号里面就可以配置接口ip了:
interface Vlanif1#interface Vlanif1000 ip address 10.0.17.40 255.255.224.0#interface Vlanif1740 ip address 172.17.40.1 255.255.255.0
#interface Vlanif1741 ip address 172.17.41.1 255.255.255.0 dhcp select global#interface Vlanif1742 ip address 172.17.42.1 255.255.255.0 dhcp select global#interface Vlanif1743 ip address 172.17.43.1 255.255.255.0 dhcp select global#interface Vlanif1744 ip address 172.17.44.1 255.255.255.0 dhcp select global#interface Vlanif1745 ip address 172.17.45.1 255.255.255.0 dhcp select global#interface Vlanif1746 ip address 172.17.46.1 255.255.255.0 dhcp select global
如果喜欢可以建立几个dhcp服务地址池
ip pool vlan1746 gateway-list 172.17.46.1 network 172.17.46.0 mask 255.255.255.0 excluded-ip-address 172.17.46.192 172.17.46.254 dns-list 61.235.164.18 211.98.2.4 211.138.245.180 202.103.224.68 211.142.210.100 8.8.8.8
接着把物理接口设置为trunk 或 access口,比如:
interface GigabitEthernet0/0/1 port link-type access port default vlan 1745 ntdp enable ndp enable
#interface GigabitEthernet0/0/2 port link-type trunk port trunk pvid vlan 1746 port trunk allow-pass vlan 2 to 4094#interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 to 4094
再加一条默认路由,否则跨网段后访问不到你的vlan1000的管理ip的
ip route-static 0.0.0.0 0.0.0.0 10.0.1.1
最后,在aaa里面添加个用户名和密码,用户远程管理
aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user zjj password simple laozhou local-user zjj privilege level 15 local-user zjj service-type telnet
最后在vty 里面开启使用aaa里面的用户远程登录
user-interface vty 0 4 authentication-mode aaa user privilege level 15
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询