本命令可以查看查看到用户的vlan接口,内外层VLAN标记,pppoe用户接口、demux0用户接口及相关ip、用户名(ipoe用户在这里看到的是DHCP配置里的公共账号)、所在的逻辑系统(LS)和路由实例(RI)。
2. 查看用户汇总信息
user@MX960> show subscribers summary
Subscribers by State Active: 830 Total: 830
Subscribers by Client Type DHCP: 331 VLAN: 366 PPPoE: 133 Total: 830 【说明】
本命令可以从用户状态和用户类型两种方式查看到所有用户的汇总信息,其中DHCP用户数包括ip4/v6的用户数,VLAN数则包括ipoe/pppoe用户的总的vlan个数。
3. 查询dhcpv4中继代理信息
user@MX960> show dhcprelay binding
IP address Session Id Hardware address Expires State Interface
10.143.2.62 113081 00:00:e2:94:e4:cc 1075 BOUND xe-0/2/1.1073771813 10.143.0.136111568 00:01:4a:9f:f2:e1 1097 BOUND xe-0/2/1.1073752335 10.143.2.106 112609 00:01:6c:57:2f:30 1080 BOUND xe-0/2/1.1073775016 ---(more)--- 【说明】
本命令可以查看用户ipv4地址的绑定信息,包括用户ipv4地址、会话id、主机MAC地址、DHCP租期超期时间及绑定的vlan接口。
4. 查询dhcpv6 中继代理信息
user@MX960> show dhcpv6 relay binding
Prefix Session Id Expires State Interface Client DUID
2001:da8:4001:3:3e8c:c1f6:92b5:3bf6/128 113188 1327 BOUND xe-0/2/1.1073772614 LL0x1-d4:85:64:40:44:5d
2001:da8:4001:3:3d38:c660:332a:7630/128 110192 1365 BOUND xe-0/2/1.1073774241 LL_TIME0x1-0x1272aace-00:25:64:d6:33:f0
2001:da8:4001:3:f330:5530:1cb:64da/128 104660 1727 BOUND xe-0/2/1.1073772599 LL_TIME0x1-0x12b66b06-00:1f:16:34:f5:96
2001:da8:4001:3:ff15:5184:e6c2:991b/128 110833 1011 BOUND xe-0/2/1.1073774439 LL_TIME0x1-0x139fab9a-c8:0a:a9:a7:1e:ed
2001:da8:4001:3:e0ae:6088:20c9:8687/128 112516 1546 BOUND xe-0/2/1.1073774976 LL_TIME0x1-0x13c5f89c-b8:ac:6f:a2:75:4e ---(more)--- 【说明】
本命令可以查看用户ipv6地址的绑定信息,包括用户ipv6地址、会话id、主机MAC地址(位于Client DUID的中横线后面部分)、DHCP租期超期时间及绑定的vlan接口。
5. 查看用户认证信息
user@MX960> show network-access aaa statistics authentication
Authentication module statistics Requests received: 22457 Multistack requests: 0 Accepts: 22188 Rejects: 269 Challenges: 0
Requests timed out: 0 【说明】
本命令查看的是authd进程的信息,在输出信息中可以检查用户发起认证的次数、认证通过accept的次数、以及被拒绝reject(认证没有通过)、Radius服务器没有响应导致超时的次数。
6. 查看dhcp中继代理信息汇总
user@MX960>show dhcp relay statistics
Packets dropped:
Total 25174 Bad hardware address 1140 Interface not configured 20076 Send error 18 Authentication 3743 Inactive VLAN 185 No binding found 11 dhcp-service total 1
Messages received:
BOOTREQUEST 114527 DHCPDECLINE 0
DHCPDISCOVER 24867 DHCPINFORM 10666
DHCPRELEASE 58 DHCPREQUEST 78936
Messages sent:
BOOTREPLY 93782 DHCPOFFER 17044 DHCPACK 76612 DHCPNAK 126 DHCPFORCERENEW 0
Packets forwarded:
Total 61 BOOTREQUEST 0 BOOTREPLY 61
【说明】
本命令可以查看到用户dhcpv4中继报文收发状态的详细信息。详细信息请查看:
http://www.juniper.net/techpubs/en_US/junos11.4/topics/reference/command-summary/show-dhcp-relay-statistics.html
7. 查看dhcpv6中继代理信息
user@MX960> show dhcpv6 relay statistics
Dhcpv6 Packets dropped:
Total 4619 Bad Send 10 Inactive VLAN 13 No binding found 4596
Messages received:
DHCPV6_DECLINE 0 DHCPV6_SOLICIT 13964 DHCPV6_INFORMATION_REQUEST 1086 DHCPV6_RELEASE 313 DHCPV6_REQUEST 3205 DHCPV6_CONFIRM 3169 DHCPV6_RENEW 13001 DHCPV6_REBIND 144 DHCPV6_RELAY_FORW 0
Messages sent:
DHCPV6_ADVERTISE 9642 DHCPV6_REPLY 16536 DHCPV6_RECONFIGURE 0 DHCPV6_RELAY_REPL 0
【说明】
本命令可以查看到用户dhcpv6中继报文收发状态的详细信息。详细信息请查看:
http://www.juniper.net/techpubs/en_US/junos11.4/topics/reference/command-summary/show-dhcpv6-relay-statistics.html?searchid=1353662655735
8. 查看ipoe用户信息
user@MX960> show subscribers client-type dhcp
Interface IP Address/VLAN ID User Name LS:RI
demux0.1073742470 2001:da8:4001:3:5a2d:78ca:542f:71f8 default:default
demux0.1073744646 2001:da8:4001:3:5715:4b84:4fb1:d55a default:default
demux0.1073750013 10.143.0.64 default:default
demux0.1073750110 10.143.0.52 default:default
demux0.1073750140 10.143.0.36 default:default
demux0.1073750233 10.143.1.163 default:default
demux0.1073750248 10.143.2.182 default:default
demux0.1073750282 10.143.1.119 default:default ---(more)--- 【说明】
本命令可以分类查看ipoe用户的接入信息。
9. 查看pppoe用户信息
user@MX960> show subscribers client-type pppoe
Interface IP Address/VLAN ID LS:RI
pp0.1073749744 10.155.2.99 default:default
pp0.1073749746 10.155.2.101 default:default
pp0.1073749748 10.155.2.100 default:default
pp0.1073749749 10.155.2.104 default:default
snnu snnu Juniper Juniper Juniper Juniper Juniper Juniper User Name bigang ttyqqq wangxiao hanxiaomang
pp0.1073749750 10.155.2.103 nitianzheng default:default ---(more)--- 【说明】
本命令可以分类查看pppoe用户的接入信息。
10. 查找用户的demux0/pp0接口
user@MX960>show subscribers |match 10.143.2.6
demux0.1073784717 10.143.2.6 Juniper default:default
user@MX960>show subscribers |match 10.155.21.40
pp0.1073768969 10.155.21.40 dongn default:default 【说明】
上述命令可以在已知用户ip地址的情况下,查找用户接入的demux0/pp0接口。
11. 查看某一个IPoE用户信息
{master}
user@MX960> show subscribers interface demux0.1073750013 extensive
Type: DHCP //类型为DHCP,表明是ipoe用户 User Name: Juniper IP Address: 10.143.0.64 Logical System: default Routing Instance: default
Interface: demux0.1073750013 Interface type: Dynamic
Dynamic Profile Name: ipoe-jiashuqu//用于动态生成demux0接口的Dynamic Profile MAC Address: e0:05:c5:a2:ad:b7 //用户终端的MAC地址 State: Active
DHCP Relay IP Address: 10.143.0.1 Radius Accounting ID: 30258 //用户的主计费session id Session ID: 30258 //用户接入的主session id Stacked VLAN Id: 1113 //用户的S-VLAN id VLAN Id: 216 //用户的C-VLAN id Agent Circuit ID: xe-0/2/1:1113-216 //用户接入的链路ID Login Time: 2012-10-20 00:01:07 CST //用户接入时间 Service Sessions: 4 //用于计费的总的业务数 DHCP Options: len 75
35 01 01 39 02 04 00 37 09 01 03 2b 2c 2e 2f 06 21 79 0c 0e 54 4c 2d 57 52 35 34 31 47 2f 35 34 32 47 3c 09 4d 53 46 54 20 39 38 00 5f 3d 07 01 e0 05 c5 a2 ad b7 52 13 01 11 78 65 2d 30 2f 32 2f 31 3a 31 31 31 33 2d 32 31 36