Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Static Ip in Fedora 19

While using Fedora 19 on VMware player(Harvard CS50x appliance 19) , the guest OS is not able to access the internet even though the host is .

How to set static Ip address to access Internet ?

like image 840
rogue_leader Avatar asked Jan 29 '14 13:01

rogue_leader


People also ask

How do I find my IP address on Fedora?

Press CTRL + ALT + T to launch the terminal on your Fedora Desktop system. Then use ip command to view current IP addresses configured on your Fedora system.


1 Answers

First find out your interface using ifconfig

Edit the config file for that interface using your favorite text editor:

vi /etc/sysconfig/network-scripts/ifcfg-eth1 //where eth1 is your interface

You will need to change BOOTPROTO from dhcp to static and add IPADDR, NETMASK, BROADCAST and NETWORK variables.

NM_CONTROLLED="yes"
BOOTPROTO=static
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.8.248
NETMASK=255.255.255.0
BROADCAST=192.168.8.255
NETWORK=192.168.8.0
GATEWAY=192.168.8.1
TYPE=Ethernet
PEERDNS=no

Save the file :w !sudo tee % > /dev/null

Also add your DNS servers

vi /etc/resolv.conf

nameserver your_Router_ip
nameserver 8.8.8.8 # Google's DNS Server

You are ready to browse!

like image 182
rogue_leader Avatar answered Sep 22 '22 16:09

rogue_leader