G1/0/15为WAN口,自动获取IP
G1/0/8-G1/0/11为LAN口,PC接在1/0/8,自动获取到了IP地址192.168.2.100,PC ping不通192.168.1.1,路由器上可以ping通192.168.1.1,路由器也可以ping通192.168.2.100
下面是G1/0/15端口信息
[H3C]dis interface GigabitEthernet 1/0/15
GigabitEthernet1/0/15
Current state: UP
Line protocol state: UP
Description: GigabitEthernet1/0/15 Interface
Bandwidth: 1000000 kbps
Maximum transmission unit: 1500
Internet address: 192.168.1.214/24 (DHCP-allocated)
IP packet frame type: Ethernet II, hardware address: 600b-0319-e2a7
IPv6 packet frame type: Ethernet II, hardware address: 600b-0319-e2a7
Media type: twisted pair, loopback: not set, promiscuous mode: not set
Port priority: 0
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 9216
Last link flapping: 0 hours 17 minutes 52 seconds
Last clearing of counters: Never
Peak input rate: 430 bytes/sec, at 2023-12-26 01:49:39
Peak output rate: 52 bytes/sec, at 2023-12-26 01:59:14
Last 300 second input: 2 packets/sec 325 bytes/sec 0%
Last 300 second output: 0 packets/sec 33 bytes/sec 0%
Input (total): 2603 packets, 489302 bytes
225 unicasts, 972 broadcasts, 1406 multicasts, 0 pauses
Input (normal): 2603 packets, - bytes
225 unicasts, 972 broadcasts, 1406 multicasts, 0 pauses
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, - overruns, 0 aborts
- ignored, - parity errors
Output (total): 227 packets, 18663 bytes
212 unicasts, 15 broadcasts, 0 multicasts, 0 pauses
Output (normal): 227 packets, - bytes
212 unicasts, 15 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
[H3C]
这是路由表
[H3C]dis ip routing-table
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 70 0 192.168.1.1 GE1/0/15
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.0/24 Direct 0 0 192.168.1.214 GE1/0/15
192.168.1.0/32 Direct 0 0 192.168.1.214 GE1/0/15
192.168.1.214/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.214 GE1/0/15
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[H3C]
下面是配置文件
[H3C]DIS CU
#
version 7.1.064, Release 0605P18
#
sysname H3C
#
dhcp enable
#
password-recovery enable
#
vlan 1
#
vlan 10
#
dhcp server ip-pool vlan10
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
address range 192.168.2.100 192.168.2.200
dns-list 192.168.2.1
#
interface NULL0
#
interface Vlan-interface10
ip address 192.168.2.1 255.255.255.0
dhcp server apply ip-pool vlan10
#
interface GigabitEthernet1/0/0
port link-mode route
#
interface GigabitEthernet1/0/1
port link-mode route
#
interface GigabitEthernet1/0/2
port link-mode route
#
interface GigabitEthernet1/0/3
port link-mode route
#
interface GigabitEthernet1/0/4
port link-mode route
#
interface GigabitEthernet1/0/5
port link-mode route
#
interface GigabitEthernet1/0/6
port link-mode route
#
interface GigabitEthernet1/0/7
port link-mode route
#
interface GigabitEthernet1/0/12
port link-mode route
#
interface GigabitEthernet1/0/13
port link-mode route
#
interface GigabitEthernet1/0/14
port link-mode route
#
interface GigabitEthernet1/0/15
port link-mode route
ip address dhcp-alloc
#
interface GigabitEthernet1/0/8
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/9
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/10
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/11
port link-mode bridge
port access vlan 10
#
interface M-GigabitEthernet0
#
scheduler logfile size 16
#
line class console
user-role network-admin
#
line class vty
user-role network-operator
#
line con 0
user-role network-admin
#
line vty 0 63
user-role network-operator
#
domain system
#
domain default enable system
#
role name level-0
description Predefined level-0 role
#
role name level-1
description Predefined level-1 role
#
role name level-2
description Predefined level-2 role
#
role name level-3
description Predefined level-3 role
#
role name level-4
description Predefined level-4 role
#
role name level-5
description Predefined level-5 role
#
role name level-6
description Predefined level-6 role
#
role name level-7
description Predefined level-7 role
#
role name level-8
description Predefined level-8 role
#
role name level-9
description Predefined level-9 role
#
role name level-10
description Predefined level-10 role
#
role name level-11
description Predefined level-11 role
#
role name level-12
description Predefined level-12 role
#
role name level-13
description Predefined level-13 role
#
role name level-14
description Predefined level-14 role
#
user-group system
#
return
(0)
最佳答案
1.1在哪?
电脑就一个网卡吧?
(0)
配置了策略路由也不行 [H3C]acl advanced 3101 [H3C-acl-ipv4-adv-3101]rule permit ip [H3C-acl-ipv4-adv-3101]quit [H3C]policy-based-route aaa permit node 5 [H3C-pbr-aaa-5]if-match acl 3101 [H3C-pbr-aaa-5]apply next-hop 192.168.1.1 [H3C]ip local policy-based-route aaa
WAN口自动获取IP后,网关是192.168.1.1
电脑是普通的单网卡
15口配置一下nat outbound
没有这个功能。。。。 [H3C-GigabitEthernet1/0/15]? Gigabitethernet_l3 interface view commands: arp ARP module bandwidth Specify the expected bandwidth bfd BFD module cfd Connectivity Fault Detection (CFD) module dampening Set port dampening attributes ddns Dynamic Domain Name System (DDNS) module default Restore the default settings description Describe the interface dhcp DHCP module diagnostic-logfile Diagnostic log file configuration display Display current system information dldp DLDP module dns Domain Name System (DNS) module duplex Status of duplex enable Enable functions end Alias for 'return' esmc Ethernet Synchronous Message Channel exit Alias for 'quit' flow-control Enable flow control function igmp Internet Group Management Protocol (IGMP) module ip Specify IP configuration ipsec IP Security module ipv6 Specify IPv6 configuration isis Configure interface parameters for IS-IS jumboframe Specify jumbo frame forwarding lacp Configure LACP protocol link-aggregation Specify link aggregation group configuration information link-delay Set the physical state change suppression lldp Link Layer Discovery Protocol (802.1ab) local-proxy-arp Specify local proxy ARP function for same interface local-proxy-nd Local ND proxy function lock Lock the current line logfile Log file configuration loopback Specify loopback of current port mirroring-group Specify mirroring group mld Multicast Listener Discovery (MLD) module monitor System monitor mpls Multiprotocol Label Switching (MPLS) module mtu Specify Maximum Transmission Unit(MTU) of the interface multicast Multicast module no Alias for 'undo' ntp-service Network Time Protocol (NTP) module oam OAM module ospf OSPF module ospfv3 OSPFv3 interface commands packet-filter Packet filter settings pim Protocol Independent Multicast (PIM) module ping Ping function port Specify a port portal Portal authentication module proxy-arp Specify proxy ARP function proxy-nd ND proxy function ptp Precision Time Protocol module qos Quality of Service (QoS) module quit Exit from current command view repeat Repeat executing history commands reset Reset operation return Exit to User View rip Configure interface parameters for RIP ripng Configure interface parameters for RIPng rmon RMON module rsvp Resource Reservation Protocol (RSVP) module save Save current configuration security-logfile Security log file configuration show Alias for 'display' shutdown Shut down the interface speed Specify speed of current port sub-interface Specify subinterface configuration information synce Synchronous Ethernet settings synchronous Specify the synchronous mode tcp Specify TCP parameters of the interface tracert Tracert function undo Cancel current setting vrrp Virtual Router Redundancy Protocol(VRRP) module web-redirect Web redirection function write Alias for 'save' xconnect Bind a VSI [H3C-GigabitEthernet1/0/15]
接口需要配置nat才行,或者终端也获取192.168.1段的IP
不支持nat。不知道咋整
终端也从光猫获取地址吧
G1/0/15从光猫获取地址,获取的地址是192.168.1.214/24 ,网关192.168.1.1
配置了策略路由也不行 [H3C]acl advanced 3101 [H3C-acl-ipv4-adv-3101]rule permit ip [H3C-acl-ipv4-adv-3101]quit [H3C]policy-based-route aaa permit node 5 [H3C-pbr-aaa-5]if-match acl 3101 [H3C-pbr-aaa-5]apply next-hop 192.168.1.1 [H3C]ip local policy-based-route aaa
配置了ACL和包过滤也不行
[H3C]dis acl all
Advanced IPv4 ACL 3000, 1 rule,
ACL"s step is 5
rule 0 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.1 0
[H3C-GigabitEthernet1/0/15]dis this
#
interface GigabitEthernet1/0/15
port link-mode route
ip address dhcp-alloc
packet-filter 3000 outbound
#
return
G1/0/15不支持NAT
[H3C-GigabitEthernet1/0/15]?
Gigabitethernet_l3 interface view commands:
arp ARP module
bandwidth Specify the expected bandwidth
bfd BFD module
cfd Connectivity Fault Detection (CFD) module
dampening Set port dampening attributes
ddns Dynamic Domain Name System (DDNS) module
default Restore the default settings
description Describe the interface
dhcp DHCP module
diagnostic-logfile Diagnostic log file configuration
display Display current system information
dldp DLDP module
dns Domain Name System (DNS) module
duplex Status of duplex
enable Enable functions
end Alias for "return"
esmc Ethernet Synchronous Message Channel
exit Alias for "quit"
flow-control Enable flow control function
igmp Internet Group Management Protocol (IGMP) module
ip Specify IP configuration
ipsec IP Security module
ipv6 Specify IPv6 configuration
isis Configure interface parameters for IS-IS
jumboframe Specify jumbo frame forwarding
lacp Configure LACP protocol
link-aggregation Specify link aggregation group configuration information
link-delay Set the physical state change suppression
lldp Link Layer Discovery Protocol (802.1ab)
local-proxy-arp Specify local proxy ARP function for same interface
local-proxy-nd Local ND proxy function
lock Lock the current line
logfile Log file configuration
loopback Specify loopback of current port
mirroring-group Specify mirroring group
mld Multicast Listener Discovery (MLD) module
monitor System monitor
mpls Multiprotocol Label Switching (MPLS) module
mtu Specify Maximum Transmission Unit(MTU) of the interface
multicast Multicast module
no Alias for "undo"
ntp-service Network Time Protocol (NTP) module
oam OAM module
ospf OSPF module
ospfv3 OSPFv3 interface commands
packet-filter Packet filter settings
pim Protocol Independent Multicast (PIM) module
ping Ping function
port Specify a port
portal Portal authentication module
proxy-arp Specify proxy ARP function
proxy-nd ND proxy function
ptp Precision Time Protocol module
qos Quality of Service (QoS) module
quit Exit from current command view
repeat Repeat executing history commands
reset Reset operation
return Exit to User View
rip Configure interface parameters for RIP
ripng Configure interface parameters for RIPng
rmon RMON module
rsvp Resource Reservation Protocol (RSVP) module
save Save current configuration
security-logfile Security log file configuration
show Alias for "display"
shutdown Shut down the interface
speed Specify speed of current port
sub-interface Specify subinterface configuration information
synce Synchronous Ethernet settings
synchronous Specify the synchronous mode
tcp Specify TCP parameters of the interface
tracert Tracert function
undo Cancel current setting
vrrp Virtual Router Redundancy Protocol(VRRP) module
web-redirect Web redirection function
write Alias for "save"
xconnect Bind a VSI
[H3C-GigabitEthernet1/0/15]
(0)
楼上说的对,没有nat的原因,没有nat,你数据包源ip是192.169.2.0地址段,外网没有192.168.2.0的路由的,所以用pcping不同,其实你pc连外网都ping不同
(0)
有没有什么思路没
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
谢谢