HermannPrechtl,
Welcome to LQ. I have no clue what OSCAR is because I have never used it. I do think, like OdinnBurkni, it is irrelevant to what you need to do.
you wanted to see an example of an /etc/hosts file. Here is mine
Code:
jared@Sarah:~$ cat /etc/hosts
127.0.0.1 localhost
10.1.1.20 Sarah
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
jared@Sarah:~$
All /etc/hosts does is associate an IP address to a hostname or domain. Windows also uses hosts files. they are located in C:\windows\system32\drivers\etc\hosts. Here is how it works.
In the host file you simply list the IP Address then Hostname or domain. Here is an example
Code:
127.0.0.1 localhost
74.125.45.103 google.com
10.1.1.20 Sarah
The above is the IPv4 configuration. At this time thats all you need to worry about. Yes IPv6 is out there, but is not the standard yet and most likely is not needed. In the above code 127.0.0.1 is my localhost (this computer). that is the same for any machine. This computer is named Sarah and I use a static IP of 10.1.1.20 for this machine. if you Ping google.com you will see the returned IP address is 74.125.45.103. Does that make sense on how the file works?
Your next question was on setting up a static IP address on one of your NICs. First you need to identify which NIC is the one needing the Static IP address. In most cases it will be either eth0 or eth1. I will show you how to setup a static IP on eth0. I will list command line commands in ().
1. Become root. (su)
2. make a backup of /etc/sysconfig/network-scripts/ifcfg-eth0 (cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak)
3. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 (nano /etc/sysconfig/network-scripts-ifcfg-eth0)
4. Setup your /etc/sysconfig/network-scripts/ifcfg-eth0 file to look like this
Code:
TYPE=Ethernet
DEVICE=eth0
BOOTPROTO=
IPADDR=192.168.0.45
NETMASK=255.255.255.0
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
ONBOOT=yes
5. Bring Down eth0 and bring it back up (ifdown eth0 && ifup eth0)
6. Check IP address of eth0 (ifconfig eth0)
It should look something like this
Code:
Sarah:/home/jared# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1f:c6:1d:64:10
inet addr:10.1.1.20 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::21f:c6ff:fe1d:6410/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10071342 errors:0 dropped:144 overruns:0 frame:0
TX packets:7564817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6459863172 (6.0 GiB) TX bytes:12851860823 (11.9 GiB)
Interrupt:18