cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3949
Views
10
Helpful
7
Replies

Cisco Modeling Labs Alpine Desktop PC Initial Configuration

Hello,

 

When I download my lab file from cml the desktop computers from my lab does not save the eth0 static ip address, netmask or gateway.

Is there a way to save it? Or write it yourself in the yaml file downloaded form the lab?

 

Screen Shot 2021-05-11 at 12.30.14.png

This is the configuration of the pc in the yaml file but i don't undertand how to set the static ip in this file. Have tried adding address on the eth0 on interfaces section but does not work.

 

Help, thanks.

3 Accepted Solutions

Accepted Solutions

Martin L
VIP
VIP

 

we had some discussions about this in CLN, cisco learning network.  Once you get and add script to Config tab of a device, save configs, then export. 

go to CLN CML group forum and look for details.  Link to various ways to save config for Linux is at

https://learningnetwork.cisco.com/s/question/0D53i00000f2kD9CAI/when-i-put-an-ip-address-on-the-desktop-nodes-it-does-not-get-saved-suggestions

Still looking for post with detailed steps on how to save and export config from CML. We had one or 2 good posts at CLN.

 

Regards, ML
**Please Rate All Helpful Responses **

 

View solution in original post

So finally I added this two lines at the end:

 

 ifconfig eth0 up 192.168.14.4 netmask 255.255.255.0

 route add default gw 192.168.14.1 dev eth0

 

Screen Shot 2021-05-14 at 15.00.20.png

View solution in original post

7 Replies 7

balaji.bandi
Hall of Fame
Hall of Fame

sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up

or

Linux as below :

"interfaces" in /etc/network/interfaces

example:
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Where do I place this in the yaml file? I know how to set up a static ip address on the alpine desktop. What i would like to do is to not set it up every time i start a cml session, because when i download the cml yaml file from the lab it doesnt save the desktop configuration (eth0 ip address, netmask, gateway).

Martin L
VIP
VIP

 

we had some discussions about this in CLN, cisco learning network.  Once you get and add script to Config tab of a device, save configs, then export. 

go to CLN CML group forum and look for details.  Link to various ways to save config for Linux is at

https://learningnetwork.cisco.com/s/question/0D53i00000f2kD9CAI/when-i-put-an-ip-address-on-the-desktop-nodes-it-does-not-get-saved-suggestions

Still looking for post with detailed steps on how to save and export config from CML. We had one or 2 good posts at CLN.

 

Regards, ML
**Please Rate All Helpful Responses **

 

So finally I added this two lines at the end:

 

 ifconfig eth0 up 192.168.14.4 netmask 255.255.255.0

 route add default gw 192.168.14.1 dev eth0

 

Screen Shot 2021-05-14 at 15.00.20.png

except Ubuntu, there are 2-3 ways to add IP info for linux device in cml. Ubuntu device is more strict about its config and settings. So I would avoid using Ubuntu.

Export your lab, re-name and import it again to see if the same configs are back.

 

Regards, ML
**Please Rate All Helpful Responses **

Yes they are always there, they get saved. The trick is as you said add it to the config tab or file. Thank you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: