system-view
System View: return to User View with Ctrl+Z.
[H3C]interface GigabitEthernet 0/0
[H3C-GigabitEthernet0/0]ip address XX.XX.XX.XX 255.255.255.0
(根据自己实际情况配置出口ip和掩码)
[H3C-GigabitEthernet0/0]quit
[H3C]interface GigabitEthernet 0/1
[H3C-GigabitEthernet0/1]ip address 192.168.1.1 255.255.255.0
[H3C-GigabitEthernet0/1]quit
[H3C]nat address-group ?
INTEGER<0-65535> NAT address group number
[H3C]nat address-group 1
[H3C-address-group-1]?
Address-group view commands:
address Add a NAT address group member
diagnostic-logfile Diagnostic log file configuration
dialer Specify Dial-on-Demand Routing(DDR) configuration
information
display Display current system information
logfile Log file configuration
monitor System monitor
ping Ping function
quit Exit from current command view
return Exit to User View
save Save current configuration
security-logfile Security log file configuration
tracert Tracert function
undo Cancel current setting
[H3C-address-group-1]address XX.XX.XX.XX XX.XX.XX.XX
(根据实际情况,配置地址转换的起始IP和结束IP,务必包括上述出口IP)
[H3C-address-group-1]quit
[H3C]acl number 2000
[H3C-acl-basic-2000]rule 0 permit source 192.168.1.0 0.0.0.255
[H3C-acl-basic-2000]quit
[H3C]interface GigabitEthernet 0/0
[H3C-GigabitEthernet0/0]nat outbound 2000 address-group 1
[H3C-GigabitEthernet0/0]quit
[H3C]ip ?
as-path Specify an AS path
community-list Specify a community list entry
extcommunity-list Specify an extended community-list entry
fast-forwarding IP fast-forwarding information
host Add a static host name-to-IPv4 address mapping
icmp Specify ICMP configuration information
local Apply a policy to locally generated packets
netstream NetStream function
pool Specify an IP address pool
prefix-list Specify an IPv4 prefix list
redirects Send ICMP Redirect packets
route-static Establish a static route
rpf-route-static Specify static multicast route
source Source binding function
ttl-expires Send ICMP Time Exceeded packets
unreachables Send ICMP Destination Unreachable packets
vpn-instance Specify a VPN instance
[H3C]interface GigabitEthernet 0/0
[H3C-GigabitEthernet0/0]undo shutdown
[H3C-GigabitEthernet0/0]quit
[H3C]%Sep 20 19:56:27:363 2014 H3C IFNET/3/PHY_UPDOWN: GigabitEthernet0/0 link status is up.
%Sep 20 19:56:27:364 2014 H3C IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet0/0 is up.
[H3C]interface GigabitEthernet 0/1
[H3C-GigabitEthernet0/1]undo shutdown
[H3C-GigabitEthernet0/1]quit
[H3C]%Sep 20 19:56:47:628 2014 H3C IFNET/3/PHY_UPDOWN: GigabitEthernet0/1 link status is up.
[H3C]save
[H3C]ip route-static 0.0.0.0 0.0.0.0 XX.XX.XX.X
(配置默认路由,一般是出口IP所在网段的网关)
[H3C]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait…
Configuration is saved to device successfully.