目录
参考
H3C交换机常用配置 - yanling0813 - 博客园 (cnblogs.com)
2)
[Internet]int s1/0
[Internet-Serial1/0]ip address 100.1.1.1 24
[Internet-Serial1/0]quit
[Internet]int loopback 0
[Internet-LoopBack0]ip address 200.1.1.1 32
[Internet-LoopBack0]quit
[Internet]
[RTA]int s1/0
[RTA-Serial1/0]ip address 100.1.1.2 24
[RTA-Serial1/0]quit
[RTA]int g0/0
[RTA-GigabitEthernet0/0]ip address 10.1.1.1 30
[RTA-GigabitEthernet0/0]quit
[RTA]int g0/2
[RTA-GigabitEthernet0/2]ip address 10.1.1.5 30
[RTA-GigabitEthernet0/2]quit
[RTA]
[RTB]int g0/1
[RTB-GigabitEthernet0/1]ip address 10.1.1.9 30
[RTB-GigabitEthernet0/1]quit
[RTB]int g0/2
[RTB-GigabitEthernet0/2]ip address 10.1.1.6 30
[RTB-GigabitEthernet0/2]quit
[RTB]
[RTC]int g0/0
[RTC-GigabitEthernet0/0]ip address 10.4.1.254 24
[RTC-GigabitEthernet0/0]quit
[RTC]int g0/1
[RTC-GigabitEthernet0/1]ip address 10.1.1.10 30
[RTC-GigabitEthernet0/1]quit
[RTC]
[SWA]vlan 10
[SWA-vlan10]int vlan-interface10
[SWA-Vlan-interface10]ip address 10.1.1.2 30
[SWA-Vlan-interface10]quit
[SWA]vlan 20
[SWA-vlan20]int vlan-interface20
[SWA-Vlan-interface20]ip address 10.2.1.254 24
[SWA-Vlan-interface20]quit
[SWA]vlan 30
[SWA-vlan30]int vlan-interface30
[SWA-Vlan-interface30]ip address 10.3.1.254 24
[SWA-Vlan-interface30]quit
[SWA]
PCA
[PCB-Server]vlan 30
[PCB-Server-vlan30]int vlan-interface30
[PCB-Server-Vlan-interface30]ip address 10.3.1.1 24
[PCB-Server-Vlan-interface30]quit
[PCB-Server]ip route-static 0.0.0.0 0.0.0.0 10.3.1.254
[PCB-Server]
3)
[SWA]vlan 20
[SWA-vlan20]port g1/0/3 to g1/0/9
[SWA-vlan20]quit
[SWA]vlan 30
[SWA-vlan30]port g1/0/13 to g1/0/19
[SWA-vlan30]quit
[SWA]
[SWB]vlan 20
[SWB-vlan20]port g1/0/4 to g1/0/10
[SWB-vlan20]quit
[SWB]vlan 30
[SWB-vlan30]port g1/0/14 to g1/0/20
[SWB-vlan30]quit
[SWB]
[SWC]vlan 20
[SWC-vlan20]port g1/0/14 to g1/0/20
[SWC-vlan20]quit
[SWC]vlan 30
[SWC-vlan30]port g1/0/4 to g1/0/10
[SWC-vlan30]quit
[SWC]
[SWA]int g1/0/1
[SWA-GigabitEthernet1/0/1]port link-type trunk
[SWA-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30
[SWA-GigabitEthernet1/0/1]quit
[SWA]int g1/0/2
[SWA-GigabitEthernet1/0/2]port link-type trunk
[SWA-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30
[SWA-GigabitEthernet1/0/2]quit
[SWA]
[SWB]int g1/0/1
[SWB-GigabitEthernet1/0/1]port link-type trunk
[SWB-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30
[SWB-GigabitEthernet1/0/1]quit
[SWB]int g1/0/3
[SWB-GigabitEthernet1/0/3]port link-type trunk
[SWB-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30
[SWB-GigabitEthernet1/0/3]quit
[SWB]
[SWC]int g1/0/2
[SWC-GigabitEthernet1/0/2]port link-type trunk
[SWC-GigabitEthernet1/0/2]port trunk permit vlan 10 20 30
[SWC-GigabitEthernet1/0/2]quit
[SWC]int g1/0/3
[SWC-GigabitEthernet1/0/3]port link-type trunk
[SWC-GigabitEthernet1/0/3]port trunk permit vlan 10 20 30
[SWC-GigabitEthernet1/0/3]quit
[SWC]
连通性:
PCA与PCB_Server之间不可连通,
与interface vlan10、interface vlan20、interface vlan30之间均可连通。
PCB_Server与interface vlan10、interface vlan20、interface vlan30之间均不可连通。
interface vlan10、interface vlan20、interface vlan30相互之间均可连通。
4)
[RTC]dhcp enable
[RTC]dhcp server forbidden-ip 10.4.1.254
[RTC]dhcp server ip-pool 0
[RTC-dhcp-pool-0]network 10.4.1.0 mask 255.255.255.0
[RTC-dhcp-pool-0]gateway-list 10.4.1.254
[RTC-dhcp-pool-0]quit
[RTC]
Host_1成功自动获得地址池内部IP地址。
5)
[RTA]int loopback 0
[RTA-LoopBack0]ip address 2.2.2.2 32
[RTA-LoopBack0]quit
[RTA]router id 2.2.2.2
[RTA]ospf
[RTA-ospf-1]area 1
[RTA-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3
[RTA-ospf-1-area-0.0.0.1]quit
[RTA-ospf-1]area 0
[RTA-ospf-1-area-0.0.0.0]network 10.1.1.4 0.0.0.3
[RTA-ospf-1-area-0.0.0.0]quit
[RTA-ospf-1]
[RTB]int loopback 0
[RTB-LoopBack0]ip address 3.3.3.3 32
[RTB-LoopBack0]quit
[RTB]router id 3.3.3.3
[RTB]ospf
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[RTB-ospf-1-area-0.0.0.0]network 10.1.1.4 0.0.0.3
[RTB-ospf-1-area-0.0.0.0]quit
[RTB-ospf-1]area 2
[RTB-ospf-1-area-0.0.0.2]network 10.1.1.9 0.0.0.3
[RTB-ospf-1-area-0.0.0.2]quit
[RTB-ospf-1]
[RTC]int loopback 0
[RTC-LoopBack0]ip address 4.4.4.4 32
[RTC-LoopBack0]quit
[RTC]router id 4.4.4.4
[RTC]ospf
[RTC-ospf-1]area 2
[RTC-ospf-1-area-0.0.0.2]network 10.1.1.10 0.0.0.3
[RTC-ospf-1-area-0.0.0.2]network 10.4.1.254 0.0.0.0
[RTC-ospf-1-area-0.0.0.2]network 10.1.1.9 0.0.0.3
[RTC-ospf-1-area-0.0.0.2]quit
[RTC-ospf-1]
6)
[RTA]telnet server enable
[RTA]line vty 0 63
[RTA-line-vty0-63]authentication-mode scheme
[RTA-line-vty0-63]quit
[RTA]local-user admin
[RTA-luser-manage-admin]password simple jollin1357
[RTA-luser-manage-admin]service-type telnet
[RTA-luser-manage-admin]authorization-attribute user-role network-admin
[RTA-luser-manage-admin]quit
[RTA]
[RTB]telnet server enable
[RTB]line vty 0 63
[RTB-line-vty0-63]authentication-mode scheme
[RTB-line-vty0-63]quit
[RTB]local-user admin
[RTB-luser-manage-admin]password simple jollin1357
[RTB-luser-manage-admin]service-type telnet
[RTB-luser-manage-admin]authorization-attribute user-role network-admin
[RTB-luser-manage-admin]quit
[RTB]
[RTC]telnet server enable
[RTC]line vty 0 63
[RTC-line-vty0-63]authentication-mode scheme
[RTC-line-vty0-63]quit
[RTC]local-user admin
[RTC-luser-manage-admin]password simple jollin1357
[RTC-luser-manage-admin]service-type telnet
[RTC-luser-manage-admin]authorization-attribute user-role network-admin
[RTC-luser-manage-admin]quit
[RTC]
7)8)
2)的↓
[Internet]int loopback 0
[Internet-LoopBack0]ip address 200.1.1.1 32
[Internet-LoopBack0]quit
[Internet]
[RTA]nat address-group 1
[RTA-address-group-1]address 100.1.1.2 100.1.1.2
[RTA-address-group-1]int s1/0
[RTA-Serial1/0]ip address 100.1.1.2 24
[RTA-Serial1/0]nat outbound 2000 address-group 1
[RTA-Serial1/0]acl basic 2000
[RTA-acl-ipv4-basic-2000]rule 0 permit source 10.2.1.0 0.0.0.255
[RTA-acl-ipv4-basic-2000]rule 1 permit source 10.3.1.0 0.0.0.255
[RTA-acl-ipv4-basic-2000]quit
[RTA]ospf
[RTA-ospf-1]default-route-advertise
[RTA-ospf-1]quit
[RTA]ip route-static 0.0.0.0 0 100.1.1.1
[RTA]