In this Document
Goal
Solution
1. Check If Kernel Recognized Network Card.
2. Configuring Network File
3. Create Network Interface File
4. Bring Up Network
5. Checking Network Device Up or Not
6. Shutting Down Inteface
7. Try Connecting
8. Routing Troubleshooting.
9. Verify Route and Default Gateway
10. Useful Network Commands
APPLIES TO:
GOAL
This note explains how to configure network interface using Ethernet and
TCP/IP protocol. The example here is based on LINUX OS but concepts are same
for most of the operating systems with minor variations.Also included are list
of usefull network commands.
SOLUTION
Following info is required (all this info can be obtained from the local System
Administrator):
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=m4vae16ss_128&id=132044.1 1/6
10/22/13 Document 132044.1
In linux netcfg (GUI) can be used to configure but here will explain
configuration using network interface files.
On a running system, to find if the kernel recognizing network interface card use the following
Network file:/etc/sysconfig/network
NETWORKING =Yes
FORWARD_IPV4=YES < set it to YES only if linux server acts as gateway or router>
HOSTNAME= <host name>.<domain name>.com
DOMAINNAME = <domain name>
GATEWAY= <ip_address> For routing packet to and from your computer over a network.
GATEWAYDEV=<eth0/eth1> (This is important when there are multiple network interfaces. eth0
against
GATEWAYDEV shows only one interface. (eth0 is the RedHat Linux ethernet adapter default,
depending on Linux distribution) If there are multiple interfaces that specify the interface name
that will connect to default gateway.)
/etc/sysconfig/network-scripts/ifcfg-interface
/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
IPADDR=
NETMASK=
NETWORK=
BROADCAST=
ONBOOT=YES <set it to YES to be up during boot time)
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=m4vae16ss_128&id=132044.1 2/6
10/22/13 Document 132044.1
4. Bring Up Network
After configuring these two files one should able to bring up the network.
%/etc/sysconfig/network-scripts/ifup eth0
%ifconfig eth0
7. Try Connecting
% ping 192.168.0.2
If not able to ping a host using hostname then verify name server ip
address is correct or not in /etc/resolv.conf . There could be several
other reasons why ping may not work but this is one of the reasons and
one of the ways to get it working.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=m4vae16ss_128&id=132044.1 3/6
10/22/13 Document 132044.1
%/etc/resolv.conf
contents of the file.
Two entries:
Search machine_name
Nameserver <ip_address>.
8. Routing Troubleshooting.
Ex:
To create a default route for an 307.171.20.40 network which has netmask
as 255.255.255.240 for eth0 interface
Default gateway
%route -n or netstat -r
Then do a ping this should work. Bingo your network is up and running and get
to go.
B. To bring up network
There are several methods but easiest way is to use following command:
C. To shutdown network
Ex output:
Server: dns1.us.oracle.com
Address: 144.25.88.144
Name: aoltst1.us.oracle.com
Address: 138.2.122.117
This should return output if the DNS recognizes IP address or node name.
If not then DNS needs to be configured. To run nslookup interactively just
type in
% nslookup <enter>
% nslookup ? or help
E. To display status of the network connections both to and from local system
% netstat -a -r -c -I
The above command will display all the information about network.
%hostname
%ping
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=m4vae16ss_128&id=132044.1 5/6
10/22/13 Document 132044.1
The above command with packet size of 100016 errored out with following
message
J. To debug network
The above command will make tcpdump listen for packets between two computers.
This will display the FTP-realted packets that are originating and arriving
to your network.
K. To verify network route and default gateway are properly set up in routing
table
%route -n
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=m4vae16ss_128&id=132044.1 6/6