Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-27-2010, 11:08 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2010
Posts: 7
Rep:
|
I set an static ipaddress on network-scripts but dinamic ip shows on ifconfig
Hi!
I recently installed fedora 12 in my server where I had a page published in my local net by tomcat, and I was looking on the Internet how to set up an static ip address and this is what I did
on /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express
#
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=10.17.148.26
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=10.17.148.255
NETWORK=10.17.148.0
and there is another one on
/etc/sysconfig/networking/devices they have the same content
I put this on the command line
ifdown eth0
ifup eth0
then I can access via ssh by two addresses the one I got from dhcp (10.17.148.223) and the static one (10.17.148.26)
I put ifconfig and and 10.17.148.223 appear on eth0
I restart my server and I just can access from 10.17.148.223
I have to put
ifdown eth0
ifup eth0
Again...to access by my static ip, y can access my page by its dns on my server, but I cant access from other computer...so, I guess when my static adress appears on ifconfig I would be able to access my page from other computer...
how can I do this? thanks
|
|
|
|
01-27-2010, 12:21 PM
|
#2
|
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
After "ifup eth0", please type: ifconfig eth0, and check your self, which IP interface has.
|
|
|
|
01-27-2010, 12:31 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2010
Posts: 7
Original Poster
Rep:
|
eth0 Link encap:Ethernet HWaddr 00:12:3F:77:11:12
inet addr:10.17.148.223 Bcast:10.17.148.255 Mask:255.255.255.0
inet6 addr: fe80::212:3fff:fe77:1112/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:628 errors:0 dropped:0 overruns:0 frame:0
TX packets:267 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76183 (74.3 KiB) TX bytes:47170 (46.0 KiB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 b) TX bytes:240 (240.0 b)
=(
I tried also #ifconfig eth0 10.17.148.26 netmask 255.255.255.0 broadcast 10.17.148.255 gateway 10.17.148.1, but I cant seem to have access to intenet
|
|
|
|
01-27-2010, 12:41 PM
|
#4
|
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
You want to say that after ifconfig eth0 10.17.148.26, your IP won't change?
|
|
|
|
01-27-2010, 12:56 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2010
Posts: 7
Original Poster
Rep:
|
My ip chages...sorry...I wasnt on the server I was remotely connected trough ssh and with ifconfig it changes....it just that I dont have access to internet....indeed now I have two options on the icon of link just aside of the clock on the desktop....how do I get access to the intenet? thanks
|
|
|
|
01-27-2010, 12:59 PM
|
#6
|
|
LQ Newbie
Registered: Jan 2010
Posts: 7
Original Poster
Rep:
|
look...
$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:12:3F:77:11:12
inet addr:10.17.148.223 Bcast:10.17.148.255 Mask:255.255.255.0
inet6 addr: fe80::212:3fff:fe77:1112/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2525 errors:0 dropped:0 overruns:0 frame:0
TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:287238 (280.5 KiB) TX bytes:22128 (21.6 KiB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)
I change my option on the network icon and this is the result but no Internet access
ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:12:3F:77:11:12
inet addr:10.17.148.26 Bcast:10.17.148.255 Mask:255.255.255.0
inet6 addr: fe80::212:3fff:fe77:1112/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2735 errors:0 dropped:0 overruns:0 frame:0
TX packets:320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:357854 (349.4 KiB) TX bytes:45638 (44.5 KiB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 b) TX bytes:960 (960.0 b)
|
|
|
|
01-27-2010, 01:16 PM
|
#7
|
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
To answer this question, I at least, have to know network configuration, GW - ?
|
|
|
|
01-27-2010, 02:37 PM
|
#8
|
|
LQ Newbie
Registered: Jan 2010
Posts: 7
Original Poster
Rep:
|
I fixed it...I made it by the GUI and it was because it didnt had de DNS server set....thanks!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:59 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|