396
Displaying and maintaining IPSG
Execute
display
commands in any view and
reset
commands in user view.
Task Command
Display IPv4SG bindings.
display ip source binding
[
static
| [
vpn-instance
vpn-instance-name
]
[
dhcp-relay
|
dhcp-server
|
dhcp-snooping
] ]
[
ip-address
ip-address
]
[
mac-address
mac-address
] [
vlan
vlan-id
] [
interface interface-type
interface-number
] [
slot
slot-number
]
Display IPv6SG bindings.
display ipv6 source binding
[
static
| [
vpn-instance
vpn-instance-name
]
[
dhcpv6-snooping
]
]
[
ip-address
ipv6-address
] [
mac-address
mac-address
] [
vlan
vlan-id
] [
interface interface-type interface-number
]
[
slot
slot-number
]
IPSG configuration examples
Static IPv4SG configuration example
Network requirements
As shown in
, all hosts use static IP addresses.
Configure static IPv4SG bindings on Switch A and Switch B to meet the following requirements:
•
FortyGigE 1/1/2 of Switch A allows only IP packets from Host C to pass.
•
FortyGigE 1/1/1 of Switch A allows only IP packets from Host A to pass.
•
All interfaces of Switch B allow IP packets from Host A to pass.
•
FortyGigE 1/1/1 of Switch B allows IP packets from Host B to pass.
Figure 117 Network diagram
Configuration procedure
1.
Configure Switch A:
# Configure IP addresses for the interfaces. (Details not shown.)
# Enable IPv4SG on FortyGigE 1/1/2.
<SwitchA> system-view
[SwitchA] interface fortygige 1/1/2
[SwitchA-FortyGigE1/1/2] ip verify source ip-address mac-address
# On FortyGigE 1/1/2, configure a static IPv4SG binding for Host C.