nerdexam
Red_Hat

RH302 · Question #158

There are two different networks: 192.168.0.0/24 and 192.168.1.0/24. The server has IP addresses 192.168.0.254 and 192.168.1.254 assigned to it. Configure your system's network settings to be able…

This task requires configuring your system to reach the 192.168.1.0/24 network, potentially through a gateway on the 192.168.0.0/24 network if your system is on that segment. 1. Configure system-wide network settings (if not already set): vi /etc/sysconfig/network Ensure…

Network configuration

Question

There are two different networks: 192.168.0.0/24 and 192.168.1.0/24. The server has IP addresses 192.168.0.254 and 192.168.1.254 assigned to it. Configure your system's network settings to be able to ping a host on the 192.168.1.0/24 network.

Explanation

This task requires configuring your system to reach the 192.168.1.0/24 network, potentially through a gateway on the 192.168.0.0/24 network if your system is on that segment.

  1. Configure system-wide network settings (if not already set): vi /etc/sysconfig/network Ensure: NETWORKING=yes HOSTNAME=station?.example.com (Replace '?' with your specific host identifier) GATEWAY=192.168.0.254 (This assumes your system connects to 192.168.0.0/24 and uses the server as a gateway to other networks).

  2. Configure a network interface (e.g., eth0) for the 192.168.0.0/24 network: vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.0.X (Replace X with an available IP address for your system, not .254) NETMASK=255.255.255.0 GATEWAY=192.168.0.254 (If this interface is the primary connection to the gateway).

  3. Restart the network service to apply changes: service network restart Alternatively, bring the interface down and up: ifdown eth0 ifup eth0 (Note: If a gateway is specified in both /etc/sysconfig/network and an interface-specific file, the interface-specific gateway takes precedence for that interface's traffic).

  4. Verify connectivity by pinging a host on the 192.168.1.0/24 network. For example, ping the server's interface on that network: ping 192.168.1.254

Topics

#static routing#IP configuration#multi-homed server#network interfaces

Community Discussion

No community discussion yet for this question.

Full RH302 Practice