cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
697
Views
20
Helpful
6
Replies

Does Cisco plan to include python librairy "requests" in Guestshell

Jerems
Spotlight
Spotlight

Hi,

Does anyone know if Cisco plan to provide with the python "requests" librairy in the incoming release of the Guestshell ?

Thanks in advance,

Jerems

2 Accepted Solutions

Accepted Solutions

Marcel Zehnder
Spotlight
Spotlight

Hi Jerems

You can install packages via pip in guestshell:

 

[guestshell@guestshell ~]$ sudo pip3 install requests

WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e
    100% |################################| 71kB 1.8MB/s
<SNIP>

[guestshell@guestshell ~]$ python3
Python 3.6.8 (default, Dec 22 2020, 19:04:08)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>

 

View solution in original post

Jerems
Spotlight
Spotlight

Hello dear community,

If you plan to provide with Internet access to your Guestshell container please follow this procedure :

Configure interface VirtualPortGroup0 (GW for the container):

interface VirtualPortGroup0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 no mop enabled
 no mop sysid

Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):

interface GigabitEthernet0/0/0.13
 encapsulation dot1Q 13
 ip address 192.168.13.2 255.255.255.252
 ip nat outside

 Configure NAT :

ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
 10 permit ip 192.168.1.0 0.0.0.255 any

And the app-hosting part:

app-hosting appid guestshell
 app-vnic gateway0 virtualportgroup 0 guest-interface 0
  guest-ipaddress 192.168.1.2 netmask 255.255.255.0
 app-default-gateway 192.168.1.1 guest-interface 0
 name-server0 192.168.0.252
 name-server1 192.168.0.250

 Regards,

View solution in original post

6 Replies 6

Marcel Zehnder
Spotlight
Spotlight

Hi Jerems

You can install packages via pip in guestshell:

 

[guestshell@guestshell ~]$ sudo pip3 install requests

WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e
    100% |################################| 71kB 1.8MB/s
<SNIP>

[guestshell@guestshell ~]$ python3
Python 3.6.8 (default, Dec 22 2020, 19:04:08)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>

 

Jerems
Spotlight
Spotlight

To do so i need to provide with internet access to guestshell which seems impossible at the moment.

My guestshell runs on top of a Cisco ISR1111 version 16.12.04.

By the way, let me double check with google if i can find out a way to fix this.

Yes, either internet access or you host your own repo somewhere accessible by the router (https://packaging.python.org/en/latest/guides/hosting-your-own-index/)

Jerems
Spotlight
Spotlight

Hi,

I found a fix to allow the guestshell to access Internet :

Jerems_0-1674554691427.png

Thanks to this article :

https://blog.wimwauters.com/networkprogrammability/2020-06-08_guestshell_onbox/

Thank you again

Jerems
Spotlight
Spotlight

Hello dear community,

If you plan to provide with Internet access to your Guestshell container please follow this procedure :

Configure interface VirtualPortGroup0 (GW for the container):

interface VirtualPortGroup0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 no mop enabled
 no mop sysid

Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):

interface GigabitEthernet0/0/0.13
 description Lien vers Jeyniper01 - vlan Internet
 encapsulation dot1Q 13
 ip address 192.168.13.2 255.255.255.252
 ip nat outside

 Configure NAT :

ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
 10 permit ip 192.168.1.0 0.0.0.255 any

And the app-hosting part:

app-hosting appid guestshell
 app-vnic gateway0 virtualportgroup 0 guest-interface 0
  guest-ipaddress 192.168.1.2 netmask 255.255.255.0
 app-default-gateway 192.168.1.1 guest-interface 0
 name-server0 192.168.0.252
 name-server1 192.168.0.250

 Regards,

Jerems
Spotlight
Spotlight

Hello dear community,

If you plan to provide with Internet access to your Guestshell container please follow this procedure :

Configure interface VirtualPortGroup0 (GW for the container):

interface VirtualPortGroup0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 no mop enabled
 no mop sysid

Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):

interface GigabitEthernet0/0/0.13
 encapsulation dot1Q 13
 ip address 192.168.13.2 255.255.255.252
 ip nat outside

 Configure NAT :

ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
 10 permit ip 192.168.1.0 0.0.0.255 any

And the app-hosting part:

app-hosting appid guestshell
 app-vnic gateway0 virtualportgroup 0 guest-interface 0
  guest-ipaddress 192.168.1.2 netmask 255.255.255.0
 app-default-gateway 192.168.1.1 guest-interface 0
 name-server0 192.168.0.252
 name-server1 192.168.0.250

 Regards,