跳转到内容
Ask AI

IPoE Configuration Guide

此内容尚不支持你的语言。

IPoE (IP over Ethernet) refers to a broadband access method in which a user’s host connects via Ethernet, directly obtains an IP address through DHCP (or ARP/IP packets), and establishes an access session. Compared to PPPoE, IPoE does not establish a point-to-point encapsulation tunnel; datagrams are forwarded using pure IP. The access device (BNG/access control device) performs user identification, authentication, authorization, and billing based on access location information (interface, VLAN, Option 82) and MAC addresses.

IPoE access modes are divided into Layer 2 and Layer 3 modes, with users connecting via Layer 2 or Layer 3 networks, respectively.

Layer 2 access: Users connect directly to the access device or connect to it via a Layer 2 network device. The access device must identify the user’s MAC address.

Layer 3 access: User traffic is routed to the access device via a Layer 3 network; users can connect directly to the access device or connect to it via a Layer 3 forwarding device. The access device does not need to be aware of the user’s MAC address.

When a user dynamically obtains an IP address via DHCP, IPoE intercepts the user’s DHCP packets and first authenticates the user. If authentication is successful, the user is allowed to continue requesting a dynamic IP address; otherwise, the IPoE access process is terminated. This section uses the IPoE access of an IPv4 DHCP user in a DHCP relay network environment as an example; the specific process is shown in the figure below.

The IPoE access process triggered by an IPv4 DHCP message is as follows:

  1. The DHCP client sends a DHCP-DISCOVER message;
  2. The access device inserts Option 82 into the DHCP-DISCOVER message and then forwards the message to the DHCP relay device for processing;
  3. The DHCP relay device creates an IPoE session based on the DHCP-DISCOVER message and sends an authentication request to the AAA server. The username in the authentication request message includes user information, such as the Client ID option from the DHCP message and the source MAC address of the user’s message;
  4. The AAA server returns the authentication result. If the user is authenticated, it sends an authentication acceptance message carrying authorization information; otherwise, it sends an authentication rejection message;
  5. The DHCP relay retrieves the user’s authentication and authorization results and updates the authentication status of the IPoE session to “passed” or “failed”;
  6. If the user is authenticated, the DHCP relay forwards the DHCP-DISCOVER message to the DHCP server. If authentication fails, the DHCP relay discards the DHCP-DISCOVER message;
  7. The DHCP server responds with a DHCP-OFFER message. The DHCP relay then forwards the DHCP-OFFER message to the DHCP client;
  8. The DHCP client selects a DHCP server based on the DHCP-OFFER message and sends a DHCP-REQUEST message. The DHCP relay then forwards the DHCP-REQUEST message to the DHCP server;
  9. The DHCP server responds with a DHCP-ACK message;
  10. The DHCP relay parses the user’s IP address and other address parameters from the DHCP-ACK message, updates the IPoE session, distributes the User Profile policy, and then sets the IPoE session status to online;
  11. The DHCP relay forwards the DHCP-ACK message to the DHCP client. The DHCP client obtains the IP address and related address parameters based on the received DHCP-ACK message;
  12. The access device sends a billing start message to the AAA server, initiating billing for the user.
OperationCommandDescription
Create dhcp-replaydhcp-relay <name> v4 ipoe
Configure server ipserver_ip <A.B.C.D>
Configure gatway ipgateway_ip <A.B.C.D>
Configure giaddrgiaddr <A.B.C.D/M>
OperationCommandDescription
Create radius serverradius server <A.B.C.D> passkey <key>
Configure radius source interfaceradius server <A.B.C.D> src-intf {ethernet <id>|vlan <id>|link-aggregation |<id>}
Configure radius nas ipradius server <A.B.C.D> nas-ip <A.B.C.D>
OperationCommandDescription
Create IPoE domainipoe domain <name>
Configure authentication methodauthentication method radius
Configure authentication passwordauthentication password {none|plaintext <value>|username}
Configure radius server ipauthentication radius-server <A.B.C.D>
Configure authentication usernameauthentication username {components <value>|separator <value>|suffix <value>}
Configure access-interfaceaccess-interface {l2|l3} {ethernet <interface_name>|link-aggregation-group <id>} [tagged <vlan_id>|untagged <vlan_id>]
Configure dhcp-relaydhcp-relay <name>
OperationCommandDescription
enable ipoeipoe enable
enable accountingipoe accounting enable
OperationCommand
Display ipoe statusshow ipoe status
Display ipoe sessionshow ipoe session

Network Requirements

  1. The DHCP client connects to the BRAS access device via a Layer 2 network using the IPoE method.

  2. An IPv4 address is assigned by a DHCP server.

  3. RADIUS is used as the authentication, authorization, and billing server.

Procedure

# BRAS Device

1. configure ipoe interface
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 10.100.0.1/16
2. configure dhcp reply
sonic(config)# dhcp-relay test1 v4 ipoe
sonic(config-dhcp-relay-ipoe-test1)# gateway-ip 10.100.0.1/16
sonic(config-dhcp-relay-ipoe-test1)# giaddr 10.100.0.1
sonic(config-dhcp-relay-ipoe-test1)# server_ip 9.9.9.10
3. configure radius server
sonic(config)# interface ethernet 2
sonic(config-if-2)# ip address 9.9.9.1/24
sonic(config)# radius server 9.9.9.9 nas-ip 9.9.9.1
sonic(config)# radius server 9.9.9.9 passkey radiuskey
sonic(config)# radius server 9.9.9.9 src-intf ethernet 2
4. configure ipoe domain
sonic(config)# ipoe domain test
sonic(config-ipoe-domain-test)# access-interface l2 ethernet 1
sonic(config-ipoe-domain-test-l2-ethernet-1)# dhcp-relay test1
sonic(config-ipoe-domain-test)# authentication method radius
sonic(config-ipoe-domain-test)# authentication password username
sonic(config-ipoe-domain-test)# authentication radius-server 9.9.9.9
sonic(config-ipoe-domain-test)# authentication username components ifname,source-mac
sonic(config-ipoe-domain-test)# authentication username separator @
5. enable ipoe and accounting
sonic(config)# ipoe enable
sonic(config)# ipoe accounting enable

Network Requirements

  1. The DHCP client connects to the BRAS access device via a dhcp relay device using the IPoE method.

  2. BRAS Device is used as a DHCP Server.

  3. RADIUS is used as the authentication, authorization, and billing server.

Procedure

# BRAS Device

1. configure ipoe interface
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 19.19.19.1/24
sonic(config)# ip route 10.100.0.0/24 19.19.19.19
2. configure dhcp pool
sonic(config)# dhcp pool test1 ipoe
sonic(config-dhcp-pool-test1)# network 10.100.0.1 255.255.255.0
sonic(config-dhcp-pool-test1)# address-pool 10.100.0.2 10.100.0.254
sonic(config-dhcp-pool-test1)# routers 10.100.0.1
sonic(config-dhcp-pool-test1)# dns 114.114.114.114
sonic(config-dhcp-pool-test1)# lease-time 7200 14400
3. configure radius server
sonic(config)# interface ethernet 2
sonic(config-if-2)# ip address 9.9.9.1/24
sonic(config)# radius server 9.9.9.9 nas-ip 9.9.9.1
sonic(config)# radius server 9.9.9.9 passkey radiuskey
sonic(config)# radius server 9.9.9.9 src-intf ethernet 2
4. configure ipoe domain
sonic(config)# ipoe domain test
sonic(config-ipoe-domain-test)# access-interface l3 ethernet 1
sonic(config-ipoe-domain-test-l2-ethernet-1)# dhcp-pool test1
sonic(config-ipoe-domain-test)# authentication method radius
sonic(config-ipoe-domain-test)# authentication password username
sonic(config-ipoe-domain-test)# authentication radius-server 9.9.9.9
sonic(config-ipoe-domain-test)# authentication username components ifname,source-mac
sonic(config-ipoe-domain-test)# authentication username separator @
5. enable ipoe and accounting
sonic(config)# ipoe enable
sonic(config)# ipoe accounting enable
DHCP Relay Device
sonic(config)# interface ethernet 1
sonic(config-if-1)# ip address 19.19.19.19/24
sonic(config)# ip route 12.12.12.0/24 19.19.19.1 //Used for user traffic forwarding
sonic(config)# interface Vlan 100
sonic(config-if-Vlan10)# ip address 10.100.0.1/24
sonic(config)# interface ethernet 2
sonic(config-if-2)# switch access vlan 100
sonic(config)# dhcp-relay test1 v4
sonic(config-dhcp-relay-test1)# down_link interface vlan 100
sonic(config-dhcp-relay-test1)# server_ip 19.19.19.1
sonic(config-dhcp-relay-test1)# up_link interface ethernet 1