* Re: how to set static ip in linux
@ 2014-12-16 10:08 Constantin, Costin C
2014-12-17 15:06 ` Philip Balister
0 siblings, 1 reply; 5+ messages in thread
From: Constantin, Costin C @ 2014-12-16 10:08 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
Hello Sachin
The easiest way to do this is by modifying the install script. Here is how:
Suppose you cloned poky into a local dir. on your HDD drive. I use Ubuntu for this but you can use whatever certified OS (Fedora, Centos, OpenSuse) just:
$ cd your_local_poky_dir
$ gedit meta/recipes-core/initrdscripts/files/init-install.sh
...
#before the line containing "umount /tgt_root" add the following
# interface=$(ls /sys/class/net | grep eth)
# echo "ifconfig $interface your_desired_ip netmask 255.255.255.0 up" >> /tgt_root/etc/profile
#eg.:
interface=$(ls /sys/class/net | grep eth)
echo "ifconfig $interface 10.10.10.10 netmask 255.255.255.0 up" >> /tgt_root/etc/profile
#after this comes
umount /tgt_root
...
Regards,
Costin Constantin
Yocto QA team
[-- Attachment #2: Type: text/html, Size: 3290 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set static ip in linux
2014-12-16 10:08 how to set static ip in linux Constantin, Costin C
@ 2014-12-17 15:06 ` Philip Balister
2014-12-17 15:38 ` Constantin, Costin C
0 siblings, 1 reply; 5+ messages in thread
From: Philip Balister @ 2014-12-17 15:06 UTC (permalink / raw)
To: Constantin, Costin C, yocto@yoctoproject.org
I'd install a custom /etc/network/interfaces file via a bbappend or
similar method. There is numerous examples in google of how to set up a
static Ip via the interfaces file.
Philip
On 12/16/2014 05:08 AM, Constantin, Costin C wrote:
> Hello Sachin
>
> The easiest way to do this is by modifying the install script. Here is how:
> Suppose you cloned poky into a local dir. on your HDD drive. I use Ubuntu for this but you can use whatever certified OS (Fedora, Centos, OpenSuse) just:
>
> $ cd your_local_poky_dir
> $ gedit meta/recipes-core/initrdscripts/files/init-install.sh
> ...
> #before the line containing "umount /tgt_root" add the following
> # interface=$(ls /sys/class/net | grep eth)
> # echo "ifconfig $interface your_desired_ip netmask 255.255.255.0 up" >> /tgt_root/etc/profile
> #eg.:
> interface=$(ls /sys/class/net | grep eth)
> echo "ifconfig $interface 10.10.10.10 netmask 255.255.255.0 up" >> /tgt_root/etc/profile
> #after this comes
> umount /tgt_root
> ...
>
> Regards,
>
> Costin Constantin
> Yocto QA team
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set static ip in linux
2014-12-17 15:06 ` Philip Balister
@ 2014-12-17 15:38 ` Constantin, Costin C
0 siblings, 0 replies; 5+ messages in thread
From: Constantin, Costin C @ 2014-12-17 15:38 UTC (permalink / raw)
To: Philip Balister, yocto@yoctoproject.org
... or easier, you can directly use the poky_dir/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces to
set up interfaces. An eg. would be:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
I personally used the already mentioned method for convenience, because i had a lot to work with install script
lately ...
Costin Constantin
Yocto QA team
________________________________________
From: Philip Balister [philip@balister.org]
Sent: Wednesday, December 17, 2014 5:06 PM
To: Constantin, Costin C; yocto@yoctoproject.org
Subject: Re: [yocto] how to set static ip in linux
I'd install a custom /etc/network/interfaces file via a bbappend or
similar method. There is numerous examples in google of how to set up a
static Ip via the interfaces file.
Philip
On 12/16/2014 05:08 AM, Constantin, Costin C wrote:
> Hello Sachin
>
> The easiest way to do this is by modifying the install script. Here is how:
> Suppose you cloned poky into a local dir. on your HDD drive. I use Ubuntu for this but you can use whatever certified OS (Fedora, Centos, OpenSuse) just:
>
> $ cd your_local_poky_dir
> $ gedit meta/recipes-core/initrdscripts/files/init-install.sh
> ...
> #before the line containing "umount /tgt_root" add the following
> # interface=$(ls /sys/class/net | grep eth)
> # echo "ifconfig $interface your_desired_ip netmask 255.255.255.0 up" >> /tgt_root/etc/profile
> #eg.:
> interface=$(ls /sys/class/net | grep eth)
> echo "ifconfig $interface 10.10.10.10 netmask 255.255.255.0 up" >> /tgt_root/etc/profile
> #after this comes
> umount /tgt_root
> ...
>
> Regards,
>
> Costin Constantin
> Yocto QA team
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* how to set static ip in linux
@ 2014-12-09 15:20 sachin dhiman
2014-12-10 17:15 ` Gaurang Shastri
0 siblings, 1 reply; 5+ messages in thread
From: sachin dhiman @ 2014-12-09 15:20 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
how to set static ip so that when linux boot then it get predefined ip
address.
--
Best Regards
Sachin Dhiman
[-- Attachment #2: Type: text/html, Size: 235 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-17 15:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 10:08 how to set static ip in linux Constantin, Costin C
2014-12-17 15:06 ` Philip Balister
2014-12-17 15:38 ` Constantin, Costin C
-- strict thread matches above, loose matches on Subject: below --
2014-12-09 15:20 sachin dhiman
2014-12-10 17:15 ` Gaurang Shastri
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.