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…
Question
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.
-
Configure system-wide network settings (if not already set):
vi /etc/sysconfig/networkEnsure:NETWORKING=yesHOSTNAME=station?.example.com(Replace '?' with your specific host identifier)GATEWAY=192.168.0.254(This assumes your system connects to192.168.0.0/24and uses the server as a gateway to other networks). -
Configure a network interface (e.g.,
eth0) for the192.168.0.0/24network:vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=192.168.0.X(Replace X with an available IP address for your system, not .254)NETMASK=255.255.255.0GATEWAY=192.168.0.254(If this interface is the primary connection to the gateway). -
Restart the network service to apply changes:
service network restartAlternatively, bring the interface down and up:ifdown eth0ifup eth0(Note: If a gateway is specified in both/etc/sysconfig/networkand an interface-specific file, the interface-specific gateway takes precedence for that interface's traffic). -
Verify connectivity by pinging a host on the
192.168.1.0/24network. For example, ping the server's interface on that network:ping 192.168.1.254
Topics
Community Discussion
No community discussion yet for this question.