Configuration procedure – H3C Technologies H3C MSR 50 User Manual

Page 102

Advertising
background image

89

Figure 30 Network diagram

Configuration procedure

The two hosts can be replaced by other types of network devices such as routers.

1.

Configure the router:
# Enable IP accounting.

<Router> system-view

[Router] ip count enable

# Configure an IP accounting rule.

[Router] ip count rule 1.1.1.1 24

# Set the timeout time to 1440 minutes (24 hours).

[Router] ip count timeout 1440

# Set the maximum number of flow entries in the interior table to 100.

[Router] ip count interior-threshold 100

# Set the maximum number of flow entries in the exterior table to 20.

[Router] ip count exterior-threshold 20

# Assign Ethernet 1/1 an IP address, and enable IP accounting for both incoming and outgoing IP

packets on it.

[Router] interface ethernet 1/1

[Router-Ethernet1/1] ip address 1.1.1.2 24

[Router-Ethernet1/1] ip count inbound-packets

[Router-Ethernet1/1] ip count outbound-packets

[Router-Ethernet1/1] quit

# Assign Ethernet 1/2 an IP address.

[Router] interface ethernet 1/2

[Router-Ethernet1/2] ip address 2.2.2.1 24

[Router-Ethernet1/2] quit

2.

Configure a static route on Host A and Host B respectively so that they can reach each other.

(Details not shown.)

3.

Display IP accounting statistics on the router.

[Router] display ip count inbound-packets interior

1 Inbound streams information in interior list:

SrcIP DstIP Protocol Pkts Bytes

1.1.1.1 2.2.2.2 ICMP 4 240

[Router] display ip count outbound-packets interior

1 Outbound streams information in interior list:

SrcIP DstIP Protocol Pkts Bytes

2.2.2.2 1.1.1.1 ICMP 4 240

Advertising