Domain
Whois
Additional IP addresses purchased for A-Series servers require proper configuration of secondary network cards to function correctly. This document provides detailed instructions for configuring a secondary network card (eth1) on CentOS 8.4 systems to enable access to additional IPs.
1. Log in to the Server
Access your server using the primary IP address.
2. Check Current Network Configuration
route -n
If the output doesn't show information about eth1, the secondary network card hasn't been properly recognized.
3. Check Network Card Configuration File
Verify if the configuration file for eth1 exists: vi /etc/sysconfig/network-scripts/ifcfg-eth1
If the file doesn't exist, you'll need to create it manually.
4. Obtain Network Card MAC Address
Run the following command to view all network interface information: ip address show
Example output:
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:16:3e:00:21:02 brd ff:ff:ff:ff:ff:ff
inet 172.16.0.231/24 brd 172.16.0.255 scope global dynamic eth0
valid_lft 315359279sec preferred_lft 315359279sec
inet6 fe80::216:3eff:fe00:2102/64 scope link
valid_lft forever preferred_lft forever
3: eth1: mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:16:3e:00:a8:bf brd ff:ff:ff:ff:ff:ff
inet 172.16.0.232/24 brd 172.16.0.255 scope global dynamic noprefixroute eth1
valid_lft 315359279sec preferred_lft 315359279sec
inet6 fe80::216:3eff:fe00:a8bf/64 scope link
valid_lft forever preferred_lft forever
4: bond0: mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 3e:43:fb:88:2e:e1 brd ff:ff:ff:ff:ff:ff
Locate the MAC address for eth1 in the output (in this example: 00:16:3e:00:a8:bf).
5. Configure Secondary Network Card (eth1)
vi /etc/sysconfig/network-scripts/ifcfg-eth1
Add the following content (replace with your actual MAC address):
DEVICE=eth1 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet USERCTL=yes PEERDNS=no IPV6INIT=no PERSISTENT_DHCLIENT=yes HWADDR=00:16:3e:00:a8:bf DEFROUTE=yes
6. Modify Primary Network Card (eth0) Configuration
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Locate DEFROUTE=yes and change it to: DEFROUTE=no
This step ensures the secondary network card can properly handle default routing.
7. Apply Network Configuration
Restart the network service to activate the changes: sudo systemctl restart NetworkManager
Current system time:2025-10-24 11:56:46(UTC+8) Privacy PolicyRegistrants' Benefits And Responsibilities SpecificationsRegistrant Educational Information
Copyright© 2025 oxname. All rights reserved.