Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

H3C basic configuration

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

I. basic configuration

Pc1 configuration

System-view

[h4c] sysname pc1

[h4c] int g0/0

[pc1-GigabitEthernet0/0] ip add 192.168.2.100 255.255.255.0

[pc1-GigabitEthernet0/0] undosh

[pc1-GigabitEthernet0/0] quit

[pc1] ip route-static 0.0.0.0 0.0.0.0 192.168.2.1

[pc1] displayip routing-table

Pc2 configuration

System-view

[h4c] sysname pc2

[pc2] int g0/0

[pc2-GigabitEthernet0/0] ip add 192.168.3.100 255.255.255.0

[pc2-GigabitEthernet0/0] undosh

[pc2-GigabitEthernet0/0] quit

[pc2] ip route-static 0.0.0.0 0.0.0.0 192.168.3.1

[pc2] displayip routing-table

Server configuration

System-view

[h4c] sysname server

[server] int g0/0

[server-GigabitEthernet0/0] ip add 192.168.3.250 255.255.255.0

[server-GigabitEthernet0/0] undosh

[server-GigabitEthernet0/0] quit

[server] ip route-static 0.0.0.0 0.0.0.0 192.168.3.1

[server] display ip routing-table

Pc3 configuration

System-view

[h4c] sysname pc3

[pc3] int g0/0

[pc3-GigabitEthernet0/0] ip add 202.1.1.2 55.255.255.0

[pc3-GigabitEthernet0/0] undosh

[pc3-GigabitEthernet0/0] quit

[pc3] ip route-static 0.0.0.0 0.0.0.0 202.1.1.1

[pc3] displayip routing-table

R1 configuration

System-view

[H3C] sysname r1

[r1] int g0/0

[r1-GigabitEthernet0/0] ip add 202.202.202.2 255.255.255.252

[r1-GigabitEthernet0/0] undosh

[r1-GigabitEthernet0/0] int g0/1

[r1-GigabitEthernet0/1] ip add 200.200.200.2 255.255.255.252

[r1-GigabitEthernet0/1] undosh

Change g0ax 2 port to bridge mode

[r1-GigabitEthernet0/1] int g0/2

[r1-GigabitEthernet0/2] port link-mode bridge

[r1-GigabitEthernet0/2] int vlan 1

[r1-Vlan-interface1] ip add 192.168.1.1 255.255.255.0

[r1-Vlan-interface1] undosh

R2 configuration

System-view

System View: return to User View with Ctrl+Z.

[H3C] sysname r2

[r2] int g0/0

[r2-GigabitEthernet0/0] ip add 202.202.202.1 255.255.255.252

[r2-GigabitEthernet0/0] undosh

[r2-GigabitEthernet0/0] int g0/1

[r2-GigabitEthernet0/1] ip add 222.222.222.1 255.255.255.252

[r2-GigabitEthernet0/1] undosh

[r2-GigabitEthernet0/1] int loopback 0

[r2-LoopBack0] ip add 202.202.0.1 255.255.255.255

[r2-LoopBack0]

R3 configuration

System-view

[H3C] sysname r3

[r3] int g0/1

[r3-GigabitEthernet0/1] ip add 200.200.200.1 255.255.255.252

[r3-GigabitEthernet0/1] undosh

[r3-GigabitEthernet0/1] int g0/0

[r3-GigabitEthernet0/0] ip add 222.222.222.2 255.255.255.252

[r3-GigabitEthernet0/0] undosh

[r3-GigabitEthernet0/0]

[r3-GigabitEthernet0/0] int g0/2

[r3-GigabitEthernet0/2] ip add 202.1.1.1 255.255.255.0

[r3-GigabitEthernet0/2] undosh

Sw1 configuration

[H3C] sysname sw1

[sw1] int vlan 1

[sw1-Vlan-interface1] ip add 192.168.1.2 255.255.255.0

[sw1-Vlan-interface1] undosh

[sw1] vlan 2

[sw1-vlan2] vlan 3

[sw1-vlan3] int vlan 2

[sw1-Vlan-interface2] ip add 192.168.2.1 255.255.255.0

[sw1-Vlan-interface2] undosh

[sw1-Vlan-interface2] int vlan 3

[sw1-Vlan-interface3] ip add 192.168.3.1 255.255.255.0

[sw1-Vlan-interface3] undosh

[sw1] int g1/0/6

[sw1-GigabitEthernet1/0/6] port access vlan 2

[sw1-GigabitEthernet1/0/6] int g1/0/7

[sw1-GigabitEthernet1/0/7] port access vlan 3

[sw1-GigabitEthernet1/0/7] int g1/0/8

[sw1-GigabitEthernet1/0/8] port access vlan 3

Second, routing configuration

1.sw1 configure default rout

[sw1-GigabitEthernet1/0/8] ip route-static 0.0.0.0 0.0.0.0 192.168.1.1

Configure static routes and ospf on 2.r1

System-view

[r1] ip route-static 192.168.2.0 255.255.255.0 192.168.1.2

[r1] ip route-static 192.168.3.0 255.255.255.0 192.168.1.2

[r1] ospf 1

[r1-ospf-1] area 0

[r2-ospf-1-area-0.0.0.0] net 0.0.0.0 255.255.255.255

Configure ospf on 3.r2

System-view

[r2] ospf 1

[r2-ospf-1] area 0

[r2-ospf-1-area-0.0.0.0] net 0.0.0.0 255.255.255.255

Configure ospf on 4.r3

System-view

[r3] ospf 1

[r3-ospf-1] area 0

[r3-ospf-1-area-0.0.0.0] net 0.0.0.0 255.255.255.255

Description:

III. Nat configuration

[r1] acl basic 2001

[r1-acl-ipv4-basic-2001] rule 0 permit source 192.168.2.0 0.0.0.255

[r1-acl-ipv4-basic-2001] rule 5 permit source 192.168.3.0 0.0.0.255

[r1-acl-ipv4-basic-2001] rule 10 deny

[r1-acl-ipv4-basic-2001] int g0/0

[r1-GigabitEthernet0/0] port link-mode route

[r1-GigabitEthernet0/0] descriptionlink_to_tel

[r1-GigabitEthernet0/0] nat outbound 2001

[r1-GigabitEthernet0/0] int g0/1

[r1-GigabitEthernet0/1] port link-mode route

[r1-GigabitEthernet0/1] desclink_to_end

[r1-GigabitEthernet0/1] nat outbound 2001

[r1-GigabitEthernet0/1] nat server protocol tcp global 200.200.200.2 23 inside 19

2.168.3.250 23

[r1-GigabitEthernet0/1]

Verification: from pc1 ping 202.202.0.1

Display nat session

IV. Policy routing configuration

[r1] acl advanced 3001

[r1-acl-ipv4-adv-3001] rule 0 permit ip source 192.168.3.0 0.0.0.255

[r1-acl-ipv4-adv-3001] quit

[r1] policy-based-route a1 permit node 10

[r1-pbr-a1-10] if-match acl 3001

[r1-pbr-a1-10] apply next-hop 200.200.200.1

[r1-pbr-a1-10] quit

[R1] policy-based-route A1 permit node 20 / / empty node, that is, all traffic that does not match acl3001 is released, and the routing table is checked normally.

[r1-pbr-a1-20] quit

Apply policy routing on interface vlan (interface-based policy routing is used here)

[r1] int Vlan-interface 1

[r1-Vlan-interface1] ip policy-based-route a1

[r1-Vlan-interface1]

V. Verification

1. Verify nat and turn on telnet on server

System-view

[server] telnet server enable / / enabled by default

[server] local-user admin / / create user admin

[server-luser-manage-admin] password simple benet / / configure password

[server-luser-manage-admin] service-type telnet / / specify the service type as telnet

[server-luser-manage-admin] authorization-attribute user-role level-3 / / specifies that the command level is level 3

[server-luser-manage-admin] quit

[server] user-interface vty 0 / / enter the vty line

[server-line-vty0] authentication-mode scheme / / configure the authentication method for users

[server-line-vty0] protocol inbound telnet / / supports telnet

[server-line-vty0] quit

Telnet server on pc3

Telnet 200.200.200.2

Login: admin

Password:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report